Fixing Nazara errors

This commit is contained in:
2022-03-25 06:08:12 -05:00
parent 5d04f1b393
commit a881363b9b
10 changed files with 102 additions and 26 deletions

View File

@@ -0,0 +1,2 @@
PRIVACYLEVEL=0
RATE_LIMIT=1000/5

View File

@@ -9,11 +9,17 @@
- name: Install pi-hole if needed
become: yes
register: pihole_install
command:
creates: /usr/bin/pihole-FTL
cmd: bash basic-install.sh
cmd: false # bash basic-install.sh
chdir: '/opt/pi-hole/automated install'
- name: Ensure pihole web admin password
become: yes
command: "pihole -a -p {{ passwords['Nazara'] }}"
# when: pihole_install.changed
- name: Generate DNS/DHCP from inventory
delegate_to: localhost
run_once: true
@@ -29,11 +35,6 @@
group: pihole
mode: 0644
- name: Reload dns
become: yes
command: "pihole restartdns"
when: dns_updated.changed
- name: Nazara DHCP
become: yes
register: dhcp_updated
@@ -44,8 +45,36 @@
group: root
mode: 0644
- name: Nazara Configuration
become: yes
register: conf_updated
copy:
src: pihole-FTL.conf
dest: /etc/pihole/pihole-FTL.conf
owner: root
group: root
mode: 0644
- name: Nazara DHCP Leases dir
become: yes
file:
path: /var/lib/misc/
state: directory
owner: root
group: root
mode: 0777
- name: Nazara DHCP Leases
become: yes
file:
path: /var/lib/misc/dnsmasq.leases
state: touch
owner: pihole
group: pihole
mode: 0660
- name: Reload services
become: yes
command: pihole restartdns
when: dns_updated.changed or dhcp_updated.changed
when: dns_updated.changed or dhcp_updated.changed or conf_updated.changed