diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-10-20 01:55:06 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-10-20 15:17:20 +0200 |
| commit | 34039e4525b21534b20c3aa68a543e0b2d13dda1 (patch) | |
| tree | 8eb138b6d87004d911257e7cb5783e0e5138bb88 /roles/pihole | |
| parent | a4892eed8d08dfb5aabd3ed5ba3c931353899b34 (diff) | |
Implement a better download/install for python, pihole and go role
Diffstat (limited to 'roles/pihole')
| -rw-r--r-- | roles/pihole/tasks/main.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/roles/pihole/tasks/main.yml b/roles/pihole/tasks/main.yml index 6556a7ce..0d21fc07 100644 --- a/roles/pihole/tasks/main.yml +++ b/roles/pihole/tasks/main.yml @@ -45,11 +45,17 @@ tags: - molecule-idempotence-notest +- name: "Check if pihole binary exists" + ansible.builtin.stat: + path: "/usr/local/bin/pihole" + register: pihole_binary + - name: "Download Pi-hole installer" ansible.builtin.get_url: url: "https://install.pi-hole.net" dest: "/tmp/install_pihole.sh" mode: "0755" + when: not pihole_binary.stat.exists - name: "Run Pi-hole installer" ansible.builtin.command: @@ -59,6 +65,7 @@ PIHOLE_SKIP_OS_CHECK: "true" args: creates: "/usr/local/bin/pihole" + when: not pihole_binary.stat.exists - name: "Show install output" ansible.builtin.debug: |
