diff --git a/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml b/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml index 747a007b..529f9458 100644 --- a/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml +++ b/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml @@ -1,6 +1,6 @@ --- - name: install fail2ban and configure sshd - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install fail2ban diff --git a/ansible/configuration/ssh/config-add-sshkey.yaml b/ansible/configuration/ssh/config-add-sshkey.yaml index 7cb376f2..3e19461b 100644 --- a/ansible/configuration/ssh/config-add-sshkey.yaml +++ b/ansible/configuration/ssh/config-add-sshkey.yaml @@ -1,6 +1,6 @@ --- - name: add ssh key - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install public keys diff --git a/ansible/deployment/portainer/deploy-portainer.yaml b/ansible/deployment/portainer/deploy-portainer.yaml index a653f9df..6cb288d1 100644 --- a/ansible/deployment/portainer/deploy-portainer.yaml +++ b/ansible/deployment/portainer/deploy-portainer.yaml @@ -1,6 +1,6 @@ --- - name: deploy portainer-ce latest - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes become_user: "{{ lookup('env','USER') }}" tasks: diff --git a/ansible/deployment/traefik/deploy-traefik.yaml b/ansible/deployment/traefik/deploy-traefik.yaml index fe64d1d5..042baf25 100644 --- a/ansible/deployment/traefik/deploy-traefik.yaml +++ b/ansible/deployment/traefik/deploy-traefik.yaml @@ -1,6 +1,6 @@ --- - name: deploy traefik v2.5 - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: deploy traefik diff --git a/ansible/installation/inst-core.yaml b/ansible/installation/inst-core.yaml index c69a839d..a3b91bcf 100644 --- a/ansible/installation/inst-core.yaml +++ b/ansible/installation/inst-core.yaml @@ -1,5 +1,5 @@ - name: install core packages - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install core packages diff --git a/ansible/installation/inst-docker-ubuntu.yaml b/ansible/installation/inst-docker-ubuntu.yaml index af641931..dcf61130 100644 --- a/ansible/installation/inst-docker-ubuntu.yaml +++ b/ansible/installation/inst-docker-ubuntu.yaml @@ -1,6 +1,6 @@ --- - name: install docker - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install docker dependencies diff --git a/ansible/installation/inst-microk8s.yaml b/ansible/installation/inst-microk8s.yaml index d7533f3a..4b917f99 100644 --- a/ansible/installation/inst-microk8s.yaml +++ b/ansible/installation/inst-microk8s.yaml @@ -1,6 +1,6 @@ --- - name: install microk8s - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install microk8s diff --git a/ansible/installation/inst-vm-core.yaml b/ansible/installation/inst-vm-core.yaml index 4cfeaacb..87cb698b 100644 --- a/ansible/installation/inst-vm-core.yaml +++ b/ansible/installation/inst-vm-core.yaml @@ -1,6 +1,6 @@ --- - name: install core packages for virtual machines - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install packages diff --git a/ansible/installation/inst-wireguard.yaml b/ansible/installation/inst-wireguard.yaml index 90f1a5f3..b12cb3d7 100644 --- a/ansible/installation/inst-wireguard.yaml +++ b/ansible/installation/inst-wireguard.yaml @@ -1,6 +1,6 @@ --- - name: install wireguard - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install wireguard diff --git a/ansible/installation/inst-zsh.yaml b/ansible/installation/inst-zsh.yaml index 68d570e9..2994b56e 100644 --- a/ansible/installation/inst-zsh.yaml +++ b/ansible/installation/inst-zsh.yaml @@ -1,6 +1,6 @@ --- - name: install zsh - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install zsh diff --git a/ansible/maintenance/maint-diskspace.yaml b/ansible/maintenance/maint-diskspace.yaml index fb17ad69..6414c319 100644 --- a/ansible/maintenance/maint-diskspace.yaml +++ b/ansible/maintenance/maint-diskspace.yaml @@ -1,6 +1,6 @@ --- - name: check disk space - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" tasks: - name: get disk usage ansible.builtin.command: df -h diff --git a/ansible/maintenance/maint-docker-clean.yaml b/ansible/maintenance/maint-docker-clean.yaml index 00c4e07e..e693aa51 100644 --- a/ansible/maintenance/maint-docker-clean.yaml +++ b/ansible/maintenance/maint-docker-clean.yaml @@ -1,6 +1,6 @@ --- - name: clean docker - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" tasks: - name: prune non-dangling images community.docker.docker_prune: diff --git a/ansible/maintenance/maint-reboot-required.yaml b/ansible/maintenance/maint-reboot-required.yaml index 6ef1e4e9..52c64422 100644 --- a/ansible/maintenance/maint-reboot-required.yaml +++ b/ansible/maintenance/maint-reboot-required.yaml @@ -1,6 +1,6 @@ --- - name: check if system reboot is required - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: check if system reboot is required diff --git a/ansible/maintenance/maint-reboot.yaml b/ansible/maintenance/maint-reboot.yaml index 4aa19136..5748a5b4 100644 --- a/ansible/maintenance/maint-reboot.yaml +++ b/ansible/maintenance/maint-reboot.yaml @@ -1,6 +1,6 @@ --- - name: reboot machine - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: reboot machine diff --git a/ansible/notification/notify-discord.yaml b/ansible/notification/notify-discord.yaml index 7f952ce1..ecc7c26c 100644 --- a/ansible/notification/notify-discord.yaml +++ b/ansible/notification/notify-discord.yaml @@ -11,7 +11,7 @@ - name: notify discord - hosts: "{{ hosts }}" + hosts: "{{ my_hosts | d([]) }}" vars: # The name that will be shown as sender of the notification. Note