1
0
Fork 0
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:
L3D 2021-03-08 11:47:30 +01:00
parent 071e0773d0
commit 7de4a0596f
Signed by: l3d
GPG key ID: CD08445BFF4313D1
2 changed files with 28 additions and 10 deletions

View file

@ -1,5 +1,6 @@
---
- ansible.builtin.include_tasks: versioncheck.yml
- name: run versionscheck
ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
- name: resolv.conf is ino longer immutable.
@ -11,7 +12,24 @@
changed_when: "resolv_file.changed and not resolveconf__immutable"
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
ansible.builtin.template:
src: 'templates/resolv.conf.j2'

View file

@ -1,4 +1,4 @@
---
# versionscheck
playbook_version_number: 5 # should be a integer
playbook_version_number: 6 # should be a integer
playbook_version_path: 'do1jlr.resolvconf.version'