Automated changes from linter ;P
This commit is contained in:
parent
44b73a216f
commit
f7f04e7a41
65 changed files with 392 additions and 324 deletions
|
@ -1,22 +1,23 @@
|
|||
---
|
||||
- import_tasks: remove_conflicting.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: remove_conflicting.yaml
|
||||
tags: [ never, acme_remove_conflicting ]
|
||||
|
||||
- name: Install Dehydrated
|
||||
tags: [ acme, acme_install ]
|
||||
block:
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: ssl-cert
|
||||
state: present
|
||||
|
||||
- name: Install Dehydrated
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: dehydrated
|
||||
state: present
|
||||
|
||||
- name: Install config file
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: config.sh
|
||||
dest: /etc/dehydrated/conf.d/ansible.sh
|
||||
owner: root
|
||||
|
@ -25,7 +26,7 @@
|
|||
notify: update_contact_info
|
||||
|
||||
- name: Install deploy hook
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: deploy.sh
|
||||
dest: /etc/dehydrated/conf.d/deploy.sh
|
||||
owner: root
|
||||
|
@ -33,7 +34,7 @@
|
|||
mode: 0755
|
||||
|
||||
- name: Install cronjob
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: cron
|
||||
dest: /etc/cron.d/dehydrated
|
||||
owner: root
|
||||
|
@ -41,7 +42,7 @@
|
|||
mode: 0644
|
||||
|
||||
- name: Create Nginx snippet snippets dir
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: /etc/nginx/snippets
|
||||
owner: root
|
||||
|
@ -49,7 +50,7 @@
|
|||
mode: 0755
|
||||
|
||||
- name: Install Nginx snippet
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: nginx-snippet.conf
|
||||
dest: /etc/nginx/snippets/acme.conf
|
||||
owner: root
|
||||
|
@ -57,14 +58,15 @@
|
|||
mode: 0644
|
||||
|
||||
- name: Register account
|
||||
command: dehydrated --register --accept-terms
|
||||
ansible.builtin.command:
|
||||
cmd: dehydrated --register --accept-terms
|
||||
args:
|
||||
creates: /var/lib/dehydrated/accounts
|
||||
|
||||
- tags: [ acme, acme_certs ]
|
||||
block:
|
||||
- name: Configure certificates
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: domains.txt
|
||||
dest: /etc/dehydrated/domains.txt
|
||||
owner: root
|
||||
|
@ -73,7 +75,8 @@
|
|||
notify: query_certificates
|
||||
|
||||
- name: Symlink SAN domains
|
||||
include_tasks: san_domains_loop.yaml
|
||||
ansible.builtin.include_tasks:
|
||||
file: san_domains_loop.yaml
|
||||
loop: "{{ acme_san_domains|default([]) }}"
|
||||
loop_control:
|
||||
loop_var: domains
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
- name: Remove certbot from apt
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name: [ letsencrypt, certbot ]
|
||||
state: absent
|
||||
autoremove: yes
|
||||
|
||||
- name: Remove variable directories
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ item }}"
|
||||
with_items:
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
- stat:
|
||||
- ansible.builtin.stat:
|
||||
path: "/var/lib/dehydrated/certs/{{ domains[0] }}"
|
||||
register: cert_stat
|
||||
|
||||
- file:
|
||||
- ansible.builtin.file:
|
||||
state: link
|
||||
path: "/var/lib/dehydrated/certs/{{ item }}"
|
||||
src: "/var/lib/dehydrated/certs/{{ domains[0] }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue