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,6 +12,8 @@
|
||||||
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: deploy resolv.conf
|
||||||
|
block:
|
||||||
- name: "Configure resolv.conf"
|
- name: "Configure resolv.conf"
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -19,6 +22,21 @@
|
||||||
mode: "{{ resolvconf__mode }}"
|
mode: "{{ resolvconf__mode }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: 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
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: 'templates/resolv.conf.j2'
|
||||||
|
dest: '/etc/resolv.conf'
|
||||||
|
mode: "{{ resolvconf__mode }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
|
||||||
- name: Ensure resolv.conf is immutable.
|
- name: Ensure resolv.conf is immutable.
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -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