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

19 lines
372 B
YAML
Raw Normal View History

2021-08-17 00:05:31 +02:00
- name: Check if PiHole is cloned
stat:
path: "/etc/pihole"
register: pihole_clone
- name: Gather PiHole
when: not pihole_clone.stat.exists
include: gather.yml
- name: Check if PiHole is installed
stat:
path: "/usr/local/bin/pihole"
register: pihole_bin
- name: Configure PiHole
when: pihole_bin.stat.exists
include: configure.yml
become: yes