Patch GPG deprecation errors & Caddy reload error

This commit is contained in:
2024-07-17 09:38:56 +02:00
parent b4f1d0f6a4
commit 7a1e728f2f
5 changed files with 18 additions and 16 deletions

View File

@@ -1,2 +1,2 @@
[athelas]
vps ansible_host=95.217.153.90 ansible_connection=ssh ansible_user=motysten
vps ansible_host=95.217.153.90 ansible_connection=ssh ansible_user=root

View File

@@ -4,18 +4,20 @@
tasks:
- name: Add Caddy GPG Key
ansible.builtin.apt_key:
ansible.builtin.get_url:
url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
state: present
dest: /etc/apt/keyrings/caddy.asc
mode: '0644'
force: true
- name: Add Caddy Repo
ansible.builtin.apt_repository:
repo: deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
repo: deb [signed-by=/etc/apt/keyrings/caddy.asc] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
state: present
- name: Add Caddy Src Repo
ansible.builtin.apt_repository:
repo: deb-src [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
repo: deb-src [signed-by=/etc/apt/keyrings/caddy.asc] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
state: present
- name: Install Caddy
@@ -32,7 +34,7 @@
- name: Creating webserver index.html
ansible.builtin.file:
path: /var/www/html/index.html
state: present
state: touch
group: caddy
owner: caddy
@@ -41,7 +43,5 @@
src: ~/ansible/templates/Caddyfile.j2
dest: /etc/caddy/Caddyfile
- name: Reload Caddy service
ansible.builtin.service:
name: caddy
state: reloaded
- name: Reboot
ansible.builtin.reboot:

View File

@@ -10,13 +10,15 @@
- curl
- name: Add Docker GPG Key
ansible.builtin.apt_key:
ansible.builtin.get_url:
url: https://download.docker.com/linux/debian/gpg
state: present
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
force: true
- name: Add Docker repo
ansible.builtin.apt_repository:
repo: deb https://download.docker.com/linux/debian bookworm stable
repo: deb [signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable
state: present
- name: Install Docker

View File

@@ -26,7 +26,7 @@
- name: Create new user
ansible.builtin.user:
name: "test"
name: "motysten"
groups: "sudo"
append: true
password: "{{ lookup('password', '/tmp/userpass length=12 encrypt=sha512_crypt') }}"
@@ -38,7 +38,7 @@
- name: Add SSH public key to remote host
ansible.builtin.authorized_key:
user: "test"
user: "motysten"
key: "{{ lookup('file', '~/ansible/keys/ssh_key.pub') }}"
become: true

View File

@@ -8,7 +8,7 @@
# this machine's public IP, then replace ":80" below with your
# domain name.
athelas.motysten.fr {
poc.athelas.fr {
# Set this path to your site's directory.
root * /var/www/html