mirror of
https://github.com/roles-ansible/ansible_role_resolvconf.git
synced 2024-08-16 10:09:52 +02:00
try to improve deployment...
This commit is contained in:
parent
071e0773d0
commit
7de4a0596f
2 changed files with 28 additions and 10 deletions
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- ansible.builtin.include_tasks: versioncheck.yml
|
- name: run versionscheck
|
||||||
|
ansible.builtin.include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
|
||||||
- name: resolv.conf is ino longer immutable.
|
- name: resolv.conf is ino longer immutable.
|
||||||
|
@ -11,7 +12,24 @@
|
||||||
changed_when: "resolv_file.changed and not resolveconf__immutable"
|
changed_when: "resolv_file.changed and not resolveconf__immutable"
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: "Configure resolv.conf"
|
- name: deploy resolv.conf
|
||||||
|
block:
|
||||||
|
- name: "Configure resolv.conf"
|
||||||
|
become: true
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: 'templates/resolv.conf.j2'
|
||||||
|
dest: '/etc/resolv.conf'
|
||||||
|
mode: "{{ resolvconf__mode }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
rescue:
|
||||||
|
- name: Remove /etc/resolv.conf
|
||||||
|
become: true
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: '/etc/resolv.conf'
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: "try to deplpy resolv.conf again"
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: 'templates/resolv.conf.j2'
|
src: 'templates/resolv.conf.j2'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
---
|
---
|
||||||
# versionscheck
|
# versionscheck
|
||||||
playbook_version_number: 5 # should be a integer
|
playbook_version_number: 6 # should be a integer
|
||||||
playbook_version_path: 'do1jlr.resolvconf.version'
|
playbook_version_path: 'do1jlr.resolvconf.version'
|
||||||
|
|
Loading…
Reference in a new issue