mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-21 15:53:16 +01:00
fix: fix names which did not start with an uppercase letter
This commit is contained in:
parent
24b0819e7f
commit
bde2063ec9
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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') }}"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }}"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -4,7 +4,7 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: install cockpit
|
||||
- name: Install cockpit
|
||||
ansible.builtin.apt:
|
||||
name: cockpit
|
||||
update_cache: true
|
||||
|
Loading…
Reference in New Issue
Block a user