mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 14:02:12 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
125 lines
2.4 KiB
YAML
125 lines
2.4 KiB
YAML
---
|
|
- name: Install packages
|
|
ansible.builtin.package: name={{ item }} state=present
|
|
with_items:
|
|
- bind
|
|
- unzip
|
|
- git
|
|
tags:
|
|
- packages
|
|
- dns
|
|
|
|
- name: Copy rndc config
|
|
ansible.builtin.copy: src=rndc.conf dest=/etc/rndc.conf
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy rndc key
|
|
ansible.builtin.copy: src={{ private }}/files/dns/rndc.key dest=/etc/rndc.key
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy named cache
|
|
ansible.builtin.copy: src=named.ca dest=/var/named/named.ca
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy geoip.py
|
|
ansible.builtin.copy: src=geoip.py dest=/usr/local/bin/geoip.py mode=0755
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy GeoIP.sh
|
|
ansible.builtin.copy: src=GeoIP.sh dest=/var/named/GeoIP.sh mode=0755
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
# - name: Create GeoIP acl
|
|
# ansible.builtin.command: /var/named/GeoIP.sh
|
|
# changed_when: "1 != 1"
|
|
# notify:
|
|
# - Restart named
|
|
# tags:
|
|
# - dns
|
|
|
|
- name: Copy update-dns
|
|
ansible.builtin.copy: src=update-dns dest=/usr/local/bin/update-dns mode=0755
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy zones
|
|
ansible.builtin.copy: src=zones.conf dest=/etc/named/zones.conf owner=root group=root mode=0644
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Copy named config
|
|
ansible.builtin.copy: src=named.conf dest=/etc/named.conf mode=0644 owner=root group=root
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Update dns
|
|
ansible.builtin.command: /usr/local/bin/update-dns
|
|
changed_when: "1 != 1"
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Update dns cron
|
|
cron: name="update dns" job="/usr/local/bin/update-dns >/dev/null" minute=0,15,30,45
|
|
tags:
|
|
- dns
|
|
|
|
- name: Check configuration
|
|
ansible.builtin.command: named-checkconf -zj
|
|
changed_when: false
|
|
tags:
|
|
- config
|
|
- dns
|
|
|
|
- name: Check semanage ports
|
|
ansible.builtin.command: semanage port -l
|
|
register: semanageoutput
|
|
check_mode: no
|
|
changed_when: "1 != 1"
|
|
tags:
|
|
- dns
|
|
|
|
- name: Set ports so bind statistics-channel can bind to 8053
|
|
ansible.builtin.command: semanage port -a -t dns_port_t -p tcp 8053
|
|
when: semanageoutput.stdout.find("8053") == -1
|
|
notify:
|
|
- Restart named
|
|
tags:
|
|
- dns
|
|
|
|
- name: Named service
|
|
service: name=named state=started enabled=yes
|
|
tags:
|
|
- dns
|