fix: fix YAML indentation issues

This commit is contained in:
Christoph Schug 2024-03-03 16:10:27 +01:00
parent 6943bf8fef
commit 706ac210f7
9 changed files with 82 additions and 82 deletions

View File

@ -3,17 +3,17 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: install fail2ban
ansible.builtin.apt:
name:
- fail2ban
update_cache: yes
- name: copy fail2ban configfiles
ansible.builtin.copy:
src: configfiles/debian-sshd-default.conf
dest: /etc/fail2ban/jail.d/debian-sshd-default.conf
- name: restart fail2ban
ansible.builtin.systemd_service:
state: restarted
daemon_reload: yes
name: fail2ban
- name: install fail2ban
ansible.builtin.apt:
name:
- fail2ban
update_cache: yes
- name: copy fail2ban configfiles
ansible.builtin.copy:
src: configfiles/debian-sshd-default.conf
dest: /etc/fail2ban/jail.d/debian-sshd-default.conf
- name: restart fail2ban
ansible.builtin.systemd_service:
state: restarted
daemon_reload: yes
name: fail2ban

View File

@ -3,15 +3,15 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: install public keys
ansible.posix.authorized_key:
user: "{{ lookup('env','USER') }}"
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
- name: change sudoers file
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: '^%sudo'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
validate: /usr/sbin/visudo -cf %s
- name: install public keys
ansible.posix.authorized_key:
user: "{{ lookup('env','USER') }}"
state: present
key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
- name: change sudoers file
ansible.builtin.lineinfile:
path: /etc/sudoers
state: present
regexp: '^%sudo'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
validate: /usr/sbin/visudo -cf %s

View File

@ -4,16 +4,16 @@
become: yes
become_user: "{{ lookup('env','USER') }}"
tasks:
- name: create new volume
community.docker.docker_volume:
name: portainer-data
- name: deploy portainer
community.docker.docker_container:
name: portainer
image: "docker.io/portainer/portainer-ce"
ports:
- "9443:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer-data:/data
restart_policy: unless-stopped
- name: create new volume
community.docker.docker_volume:
name: portainer-data
- name: deploy portainer
community.docker.docker_container:
name: portainer
image: "docker.io/portainer/portainer-ce"
ports:
- "9443:9443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer-data:/data
restart_policy: unless-stopped

View File

@ -3,15 +3,15 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: deploy traefik
become_user: "{{ lookup('env','USER') }}"
community.docker.docker_container:
name: traefik
image: "traefik:v2.5"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/traefik:/etc/traefik
restart_policy: unless-stopped
- name: deploy traefik
become_user: "{{ lookup('env','USER') }}"
community.docker.docker_container:
name: traefik
image: "traefik:v2.5"
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/traefik:/etc/traefik
restart_policy: unless-stopped

View File

@ -3,9 +3,9 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: install core packages
ansible.builtin.apt:
name:
- prometheus-node-exporter
- nfs-common
update_cache: yes
- name: install core packages
ansible.builtin.apt:
name:
- prometheus-node-exporter
- nfs-common
update_cache: yes

View File

@ -3,15 +3,15 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: install packages
ansible.builtin.apt:
name:
- prometheus-node-exporter
- nfs-common
- qemu-guest-agent
update_cache: yes
- name: start guest qemu-guest-agent
ansible.builtin.service:
name: qemu-guest-agent
state: started
enabled: yes
- name: install packages
ansible.builtin.apt:
name:
- prometheus-node-exporter
- nfs-common
- qemu-guest-agent
update_cache: yes
- name: start guest qemu-guest-agent
ansible.builtin.service:
name: qemu-guest-agent
state: started
enabled: yes

View File

@ -3,6 +3,6 @@
hosts: "{{ my_hosts | d([]) }}"
become: yes
tasks:
- name: reboot machine
ansible.builtin.reboot:
reboot_timeout: 3600
- name: reboot machine
ansible.builtin.reboot:
reboot_timeout: 3600

View File

@ -2,10 +2,10 @@
- hosts: all
become: yes
tasks:
- name: install microk8s
community.general.snap:
classic: yes
name: microk8s
- name: add userpermissions
ansible.builtin.shell: "usermod -aG microk8s vagrant"
- name: install microk8s
community.general.snap:
classic: yes
name: microk8s
- name: add userpermissions
ansible.builtin.shell: "usermod -aG microk8s vagrant"

View File

@ -2,7 +2,7 @@
- hosts: all
become: yes
tasks:
- name: install cockpit
ansible.builtin.apt:
name: cockpit
update_cache: yes
- name: install cockpit
ansible.builtin.apt:
name: cockpit
update_cache: yes