pihole/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 16 May 2020 12:57:11 -0500
changeset 29 a0f74d2bb1d1
parent 11 ba484e09107d
permissions -rw-r--r--
Made pihole role idempotent.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: install custom DNS names
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  copy:
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
    src: "{{pihole_custom_dns_list}}"
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
    dest: "/etc/pihole/custom.list"
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    mode: "0644"
e58af497ee2f Added basic pihole role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  notify: restart pihole-ftl
11
ba484e09107d Addd pihole updater
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    10
ba484e09107d Addd pihole updater
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    11
- name: update pihole
ba484e09107d Addd pihole updater
Luke Hoersten <luke@hoersten.org>
parents: 9
diff changeset
    12
  command: "pihole -up"
29
a0f74d2bb1d1 Made pihole role idempotent.
Luke Hoersten <luke@hoersten.org>
parents: 11
diff changeset
    13
  changed_when: false