From bde2063ec96997b62d933632c9d505da16833b07 Mon Sep 17 00:00:00 2001 From: Christoph Schug Date: Sun, 3 Mar 2024 16:54:47 +0100 Subject: [PATCH] fix: fix names which did not start with an uppercase letter --- .../fail2ban/config-f2b-protect-sshd.yaml | 8 ++++---- ansible/configuration/ssh/config-add-sshkey.yaml | 6 +++--- ansible/deployment/portainer/deploy-portainer.yaml | 6 +++--- ansible/deployment/traefik/deploy-traefik.yaml | 4 ++-- ansible/installation/inst-core.yaml | 4 ++-- ansible/installation/inst-docker-ubuntu.yaml | 10 +++++----- ansible/installation/inst-microk8s.yaml | 6 +++--- ansible/installation/inst-vm-core.yaml | 6 +++--- ansible/installation/inst-wireguard.yaml | 6 +++--- ansible/installation/inst-zsh.yaml | 4 ++-- ansible/maintenance/maint-diskspace.yaml | 8 ++++---- ansible/maintenance/maint-docker-clean.yaml | 4 ++-- ansible/maintenance/maint-reboot-required.yaml | 4 ++-- ansible/maintenance/maint-reboot.yaml | 4 ++-- ansible/notification/notify-discord.yaml | 4 ++-- vagrant/hyperv/ubuntu/docker/playbook.yaml | 10 +++++----- vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml | 4 ++-- vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml | 2 +- 18 files changed, 50 insertions(+), 50 deletions(-) diff --git a/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml b/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml index 4594833..aa26e06 100644 --- a/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml +++ b/ansible/configuration/fail2ban/config-f2b-protect-sshd.yaml @@ -1,21 +1,21 @@ --- -- name: install fail2ban and configure sshd +- name: Install fail2ban and configure sshd hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install fail2ban + - name: Install fail2ban ansible.builtin.apt: name: - fail2ban update_cache: true - - name: copy fail2ban configfiles + - 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 + - name: Restart fail2ban ansible.builtin.systemd_service: state: restarted daemon_reload: true diff --git a/ansible/configuration/ssh/config-add-sshkey.yaml b/ansible/configuration/ssh/config-add-sshkey.yaml index af7add1..100e3c3 100644 --- a/ansible/configuration/ssh/config-add-sshkey.yaml +++ b/ansible/configuration/ssh/config-add-sshkey.yaml @@ -1,16 +1,16 @@ --- -- name: add ssh key +- name: Add ssh key hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install public keys + - 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 + - name: Change sudoers file ansible.builtin.lineinfile: path: /etc/sudoers state: present diff --git a/ansible/deployment/portainer/deploy-portainer.yaml b/ansible/deployment/portainer/deploy-portainer.yaml index 1aed748..52bc8ca 100644 --- a/ansible/deployment/portainer/deploy-portainer.yaml +++ b/ansible/deployment/portainer/deploy-portainer.yaml @@ -1,15 +1,15 @@ --- -- name: deploy portainer-ce latest +- name: Deploy portainer-ce latest hosts: "{{ my_hosts | d([]) }}" become: true become_user: "{{ lookup('env','USER') }}" tasks: - - name: create new volume + - name: Create new volume community.docker.docker_volume: name: portainer-data - - name: deploy portainer + - name: Deploy portainer community.docker.docker_container: name: portainer image: "docker.io/portainer/portainer-ce" diff --git a/ansible/deployment/traefik/deploy-traefik.yaml b/ansible/deployment/traefik/deploy-traefik.yaml index 53de897..48568c6 100644 --- a/ansible/deployment/traefik/deploy-traefik.yaml +++ b/ansible/deployment/traefik/deploy-traefik.yaml @@ -1,10 +1,10 @@ --- -- name: deploy traefik v2.5 +- name: Deploy traefik v2.5 hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: deploy traefik + - name: Deploy traefik become_user: "{{ lookup('env','USER') }}" community.docker.docker_container: name: traefik diff --git a/ansible/installation/inst-core.yaml b/ansible/installation/inst-core.yaml index 1078c72..24ca7da 100644 --- a/ansible/installation/inst-core.yaml +++ b/ansible/installation/inst-core.yaml @@ -1,10 +1,10 @@ --- -- name: install core packages +- name: Install core packages hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install core packages + - name: Install core packages ansible.builtin.apt: name: - prometheus-node-exporter diff --git a/ansible/installation/inst-docker-ubuntu.yaml b/ansible/installation/inst-docker-ubuntu.yaml index 283d424..8c0ea2d 100644 --- a/ansible/installation/inst-docker-ubuntu.yaml +++ b/ansible/installation/inst-docker-ubuntu.yaml @@ -1,10 +1,10 @@ --- -- name: install docker +- name: Install docker hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install docker dependencies + - name: Install docker dependencies ansible.builtin.apt: name: - apt-transport-https @@ -14,19 +14,19 @@ - software-properties-common update_cache: true - - name: add docker gpg key + - name: Add docker gpg key ansible.builtin.apt_key: url: https://download.docker.com/linux/ubuntu/gpg state: present keyring: /etc/apt/keyrings/docker.gpg - - name: add docker repository + - name: Add docker repository ansible.builtin.apt_repository: filename: docker repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_lsb.codename|lower }} stable state: present - - name: install docker engine + - name: Install docker engine ansible.builtin.apt: name: - docker-ce diff --git a/ansible/installation/inst-microk8s.yaml b/ansible/installation/inst-microk8s.yaml index 65cc49a..87d64e4 100644 --- a/ansible/installation/inst-microk8s.yaml +++ b/ansible/installation/inst-microk8s.yaml @@ -1,13 +1,13 @@ --- -- name: install microk8s +- name: Install microk8s hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install microk8s + - name: Install microk8s community.general.snap: classic: true name: microk8s - - name: add userpermissions + - name: Add user permissions ansible.builtin.shell: "usermod -aG microk8s {{ lookup('env','USER') }}" diff --git a/ansible/installation/inst-vm-core.yaml b/ansible/installation/inst-vm-core.yaml index 94e4fb6..ba9ddd3 100644 --- a/ansible/installation/inst-vm-core.yaml +++ b/ansible/installation/inst-vm-core.yaml @@ -1,10 +1,10 @@ --- -- name: install core packages for virtual machines +- name: Install core packages for virtual machines hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install packages + - name: Install packages ansible.builtin.apt: name: - prometheus-node-exporter @@ -12,7 +12,7 @@ - qemu-guest-agent update_cache: true - - name: start guest qemu-guest-agent + - name: Start guest qemu-guest-agent ansible.builtin.service: name: qemu-guest-agent state: started diff --git a/ansible/installation/inst-wireguard.yaml b/ansible/installation/inst-wireguard.yaml index c5545f1..5303199 100644 --- a/ansible/installation/inst-wireguard.yaml +++ b/ansible/installation/inst-wireguard.yaml @@ -1,15 +1,15 @@ --- -- name: install wireguard +- name: Install wireguard hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install wireguard + - name: Install wireguard ansible.builtin.apt: name: wireguard update_cache: true - - name: generate private and public keypair + - name: Generate private and public keypair ansible.builtin.shell: | wg genkey | tee privatekey | wg pubkey > publickey chmod 0400 privatekey diff --git a/ansible/installation/inst-zsh.yaml b/ansible/installation/inst-zsh.yaml index abb2dfe..63752da 100644 --- a/ansible/installation/inst-zsh.yaml +++ b/ansible/installation/inst-zsh.yaml @@ -1,10 +1,10 @@ --- -- name: install zsh +- name: Install zsh hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: install zsh + - name: Install zsh ansible.builtin.apt: name: zsh state: present diff --git a/ansible/maintenance/maint-diskspace.yaml b/ansible/maintenance/maint-diskspace.yaml index b204f13..a07e9f0 100644 --- a/ansible/maintenance/maint-diskspace.yaml +++ b/ansible/maintenance/maint-diskspace.yaml @@ -1,17 +1,17 @@ --- -- name: check disk space +- name: Check disk space hosts: "{{ my_hosts | d([]) }}" tasks: - - name: get disk usage + - name: Get disk usage ansible.builtin.command: df -h register: disk_usage - - name: check disk space available + - name: Check disk space available ansible.builtin.shell: df -Ph / | awk 'NR==2 {print $5}' register: disk_usage - # - name: send discord message when disk space is over 80% + # - name: Send discord message when disk space is over 80% # uri: # url: "your-webhook" # method: POST diff --git a/ansible/maintenance/maint-docker-clean.yaml b/ansible/maintenance/maint-docker-clean.yaml index 533f173..1a95266 100644 --- a/ansible/maintenance/maint-docker-clean.yaml +++ b/ansible/maintenance/maint-docker-clean.yaml @@ -1,9 +1,9 @@ --- -- name: clean docker +- name: Clean docker hosts: "{{ my_hosts | d([]) }}" tasks: - - name: prune non-dangling images + - name: Prune non-dangling images community.docker.docker_prune: containers: false images: true diff --git a/ansible/maintenance/maint-reboot-required.yaml b/ansible/maintenance/maint-reboot-required.yaml index 8b8dfb3..223bdf3 100644 --- a/ansible/maintenance/maint-reboot-required.yaml +++ b/ansible/maintenance/maint-reboot-required.yaml @@ -1,10 +1,10 @@ --- -- name: check if system reboot is required +- name: Check if system reboot is required hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: check if system reboot is required + - name: Check if system reboot is required become: true ansible.builtin.stat: path: /var/run/reboot-required diff --git a/ansible/maintenance/maint-reboot.yaml b/ansible/maintenance/maint-reboot.yaml index 589f4e3..a978a18 100644 --- a/ansible/maintenance/maint-reboot.yaml +++ b/ansible/maintenance/maint-reboot.yaml @@ -1,9 +1,9 @@ --- -- name: reboot machine +- name: Reboot machine hosts: "{{ my_hosts | d([]) }}" become: true tasks: - - name: reboot machine + - name: Reboot machine ansible.builtin.reboot: reboot_timeout: 3600 diff --git a/ansible/notification/notify-discord.yaml b/ansible/notification/notify-discord.yaml index ecc7c26..eee73a0 100644 --- a/ansible/notification/notify-discord.yaml +++ b/ansible/notification/notify-discord.yaml @@ -9,7 +9,7 @@ # In order to generate a webhook, please see # https://support.discord.com/hc/en-us/articles/360045093012-Server-Integrations-Page -- name: notify discord +- name: Notify discord hosts: "{{ my_hosts | d([]) }}" @@ -62,7 +62,7 @@ notify_discord_send_from_host: localhost tasks: - - name: send discord message + - name: Send Discord message community.general.discord: username: "{{ notify_discord_username }}" webhook_id: "{{ notify_discord_webhook_id }}" diff --git a/vagrant/hyperv/ubuntu/docker/playbook.yaml b/vagrant/hyperv/ubuntu/docker/playbook.yaml index cd4612c..25cbefc 100644 --- a/vagrant/hyperv/ubuntu/docker/playbook.yaml +++ b/vagrant/hyperv/ubuntu/docker/playbook.yaml @@ -4,7 +4,7 @@ become: true tasks: - - name: install prerequisites + - name: Install prerequisites ansible.builtin.apt: name: - apt-transport-https @@ -14,15 +14,15 @@ - software-properties-common update_cache: true - - name: add apt-key + - name: Add apt-key ansible.builtin.apt_key: url: https://download.docker.com/linux/ubuntu/gpg - - name: add docker repo + - name: Add docker repo ansible.builtin.apt_repository: repo: deb https://download.docker.com/linux/ubuntu focal stable - - name: install docker + - name: Install docker ansible.builtin.apt: name: - docker-ce @@ -31,5 +31,5 @@ - docker-compose update_cache: true - - name: add userpermissions + - name: Add user permissions ansible.builtin.shell: "usermod -aG docker vagrant" diff --git a/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml b/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml index fa593d9..99a2927 100644 --- a/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml +++ b/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml @@ -4,10 +4,10 @@ become: true tasks: - - name: install microk8s + - name: Install microk8s community.general.snap: classic: true name: microk8s - - name: add userpermissions + - name: Add user permissions ansible.builtin.shell: "usermod -aG microk8s vagrant" diff --git a/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml b/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml index 946c9ab..1992f23 100755 --- a/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml +++ b/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml @@ -4,7 +4,7 @@ become: true tasks: - - name: install cockpit + - name: Install cockpit ansible.builtin.apt: name: cockpit update_cache: true