mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-27 17:39:07 +01:00
Merge pull request #154 from cschug/fix_undefined_hosts
fix: ensure `hosts` definition is always defined
This commit is contained in:
commit
4111c147f3
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install fail2ban and configure sshd
|
- name: install fail2ban and configure sshd
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install fail2ban
|
- name: install fail2ban
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: add ssh key
|
- name: add ssh key
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install public keys
|
- name: install public keys
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: deploy portainer-ce latest
|
- name: deploy portainer-ce latest
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
become_user: "{{ lookup('env','USER') }}"
|
become_user: "{{ lookup('env','USER') }}"
|
||||||
tasks:
|
tasks:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: deploy traefik v2.5
|
- name: deploy traefik v2.5
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: deploy traefik
|
- name: deploy traefik
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- name: install core packages
|
- name: install core packages
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install core packages
|
- name: install core packages
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install docker
|
- name: install docker
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install docker dependencies
|
- name: install docker dependencies
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install microk8s
|
- name: install microk8s
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install microk8s
|
- name: install microk8s
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install core packages for virtual machines
|
- name: install core packages for virtual machines
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install packages
|
- name: install packages
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install wireguard
|
- name: install wireguard
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install wireguard
|
- name: install wireguard
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: install zsh
|
- name: install zsh
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: install zsh
|
- name: install zsh
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: check disk space
|
- name: check disk space
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: get disk usage
|
- name: get disk usage
|
||||||
ansible.builtin.command: df -h
|
ansible.builtin.command: df -h
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: clean docker
|
- name: clean docker
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: prune non-dangling images
|
- name: prune non-dangling images
|
||||||
community.docker.docker_prune:
|
community.docker.docker_prune:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: check if system reboot is required
|
- name: check if system reboot is required
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: check if system reboot is required
|
- name: check if system reboot is required
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: reboot machine
|
- name: reboot machine
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: reboot machine
|
- name: reboot machine
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
- name: notify discord
|
- name: notify discord
|
||||||
|
|
||||||
hosts: "{{ hosts }}"
|
hosts: "{{ my_hosts | d([]) }}"
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
# The name that will be shown as sender of the notification. Note
|
# The name that will be shown as sender of the notification. Note
|
||||||
|
Loading…
Reference in New Issue
Block a user