Infra/ansible/roles/pihole/tasks/main.yml

18 lines
402 B
YAML
Raw Normal View History

2021-08-17 00:05:31 +02:00
- name: Check if PiHole is cloned
2022-04-15 15:51:58 +02:00
ansible.builtin.stat:
2021-08-17 00:05:31 +02:00
path: "/etc/pihole"
register: pihole_clone
- name: Gather PiHole
when: not pihole_clone.stat.exists
2022-04-15 15:51:58 +02:00
include_tasks: gather.yml
2021-08-17 00:05:31 +02:00
- name: Check if PiHole is installed
2022-04-15 15:51:58 +02:00
ansible.builtin.stat:
2021-08-17 00:05:31 +02:00
path: "/usr/local/bin/pihole"
register: pihole_bin
- name: Configure PiHole
when: pihole_bin.stat.exists
2022-04-15 15:51:58 +02:00
include_tasks: configure.yml