Patch GPG deprecation errors & Caddy reload error
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user