fix base PPA cleanup, marker file post-run, and bind snmpd validation
- base: drop leftover apt_repository removal + equivalents debug (undefined on Ubuntu resolute), clean ansible.list via file module for all debian-based distros - local.yml: default ansible_pull_marker_file in post-run so a cooldown end_play does not abort the run - nameserver: validate named config against main named.conf instead of isolated %s; add named_conf to debian/archlinux vars
This commit is contained in:
1 parent
b5b1d926be
commit
598506f58d
5 files changed
+6
-20
No files matched your search
@@ -254,7 +254,7 @@
|
|||||||
|
|
||||||
- name: post-run | update marker file timestamp on successful run
|
- name: post-run | update marker file timestamp on successful run
|
||||||
file:
|
file:
|
||||||
path: "{{ ansible_pull_marker_file }}"
|
path: "{{ ansible_pull_marker_file | default('/var/tmp/ansible_pull.last_run') }}"
|
||||||
state: touch
|
state: touch
|
||||||
tags: always
|
tags: always
|
||||||
# - name: send completion alert
|
# - name: send completion alert
|
||||||
|
|||||||
@@ -6,33 +6,17 @@
|
|||||||
state: absent
|
state: absent
|
||||||
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||||
|
|
||||||
- debug:
|
|
||||||
var: ansible_facts['distribution_release']
|
|
||||||
- debug:
|
|
||||||
var: equivalents[ansible_facts['distribution_release']]['ubuntu']
|
|
||||||
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
|
||||||
|
|
||||||
|
|
||||||
- name: ansible setup | remove ansible archive keyring
|
- name: ansible setup | remove ansible archive keyring
|
||||||
file:
|
file:
|
||||||
path: /usr/share/keyrings/ansible-archive-keyring.gpg
|
path: /usr/share/keyrings/ansible-archive-keyring.gpg
|
||||||
state: absent
|
state: absent
|
||||||
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||||
|
|
||||||
- name: ansible setup | remove repository file - Debian
|
- name: ansible setup | remove repository file - Debian / Ubuntu
|
||||||
file:
|
file:
|
||||||
path: /etc/apt/sources.list.d/ansible.list
|
path: /etc/apt/sources.list.d/ansible.list
|
||||||
state: absent
|
state: absent
|
||||||
when: ansible_facts['distribution'] == "Debian"
|
when: ansible_facts['distribution'] in ["Debian", "Pop!_OS", "Ubuntu", "Linux Mint"]
|
||||||
|
|
||||||
- name: ansible setup | remove repository - Debian / Ubuntu
|
|
||||||
tags: ansible,ansible-setup
|
|
||||||
apt_repository:
|
|
||||||
repo: "deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu {{ equivalents[ansible_facts['distribution_release']]['ubuntu'] }} main"
|
|
||||||
state: absent
|
|
||||||
update_cache: no
|
|
||||||
filename: ansible
|
|
||||||
when: ansible_facts['distribution'] in ["Debian", "Ubuntu"]
|
|
||||||
|
|
||||||
- name: ansible setup | ensure ansible is the latest version
|
- name: ansible setup | ensure ansible is the latest version
|
||||||
tags: ansible,ansible-setup
|
tags: ansible,ansible-setup
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
state: present
|
state: present
|
||||||
line: '\tstatistics-file "/var/cache/bind/stats";\n\tzone-statistics yes;'
|
line: '\tstatistics-file "/var/cache/bind/stats";\n\tzone-statistics yes;'
|
||||||
insertafter: "options {"
|
insertafter: "options {"
|
||||||
validate: "{{ named_checkconf }} %s"
|
validate: "{{ named_checkconf }} {{ named_conf }}"
|
||||||
notify: restart_named
|
notify: restart_named
|
||||||
|
|
||||||
- name: nameserver | snmpd | configure extend
|
- name: nameserver | snmpd | configure extend
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ powerdns_backends:
|
|||||||
- package: powerdns
|
- package: powerdns
|
||||||
|
|
||||||
# named / bind specific
|
# named / bind specific
|
||||||
|
named_conf: /etc/named.conf
|
||||||
named_conf_zones: /etc/named.conf
|
named_conf_zones: /etc/named.conf
|
||||||
named_conf_options: /etc/named.conf
|
named_conf_options: /etc/named.conf
|
||||||
named_conf_local: /etc/named.conf
|
named_conf_local: /etc/named.conf
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ pdns_mysql_schema: "/usr/share/pdns-backend-mysql/schema/schema.mysql.sql"
|
|||||||
pdns_mysql_socket: "/run/mysqld/mysqld.sock"
|
pdns_mysql_socket: "/run/mysqld/mysqld.sock"
|
||||||
|
|
||||||
# named / bind specific
|
# named / bind specific
|
||||||
|
named_conf: /etc/bind/named.conf
|
||||||
named_conf_zones: /etc/bind/named.conf.default-zones
|
named_conf_zones: /etc/bind/named.conf.default-zones
|
||||||
named_conf_options: /etc/bind/named.conf.options
|
named_conf_options: /etc/bind/named.conf.options
|
||||||
named_conf_local: /etc/bind/named.conf.local
|
named_conf_local: /etc/bind/named.conf.local
|
||||||
|
|||||||
Reference in new issue
Block a user