Fix issues reported by ansible-lint (var prefixes)
This commit is contained in:
parent
0f9e4544b0
commit
39fd6ef5a2
24 changed files with 86 additions and 86 deletions
|
|
@ -1,19 +1,19 @@
|
|||
---
|
||||
- name: Set config path
|
||||
ansible.builtin.set_fact:
|
||||
config_path: "{{ (service_path, 'config') | path_join }}"
|
||||
lego_config_path: "{{ (service_path, 'config') | path_join }}"
|
||||
- name: Create config directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ config_path }}"
|
||||
path: "{{ lego_config_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Create the acme-dns-accounts
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ (config_path, 'acme-dns-accounts.json') | path_join }}"
|
||||
dest: "{{ (lego_config_path, 'acme-dns-accounts.json') | path_join }}"
|
||||
content: '{{ vault_acmedns_registered | acmedns_to_lego | to_json }}'
|
||||
mode: "0644"
|
||||
- name: Copy the hook script
|
||||
ansible.builtin.copy:
|
||||
src: "hook.sh"
|
||||
dest: "{{ (config_path, 'hook.sh') | path_join }}"
|
||||
dest: "{{ (lego_config_path, 'hook.sh') | path_join }}"
|
||||
mode: "0755"
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
- name: Set hooks path
|
||||
ansible.builtin.set_fact:
|
||||
hooks_path: "{{ (service_path, 'hooks') | path_join }}"
|
||||
lego_hooks_path: "{{ (service_path, 'hooks') | path_join }}"
|
||||
- name: Create hooks directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ hooks_path }}"
|
||||
path: "{{ lego_hooks_path }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
- name: Copy the additional hooks
|
||||
ansible.builtin.copy:
|
||||
src: hooks/
|
||||
dest: "{{ hooks_path }}"
|
||||
dest: "{{ lego_hooks_path }}"
|
||||
mode: "0755"
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@
|
|||
chdir: "{{ service_path }}"
|
||||
become: true
|
||||
loop: "{{ lego_host_certificates }}"
|
||||
register: cmd_result
|
||||
changed_when: cmd_result.stderr | regex_search('Server responded with a certificate.')
|
||||
register: lego_cmd_result
|
||||
changed_when: lego_cmd_result.stderr | regex_search('Server responded with a certificate.')
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
ansible.builtin.shell:
|
||||
executable: /usr/bin/bash
|
||||
cmd: "set -o pipefail && systemctl list-timers 'lego@*' --all --output=json | jq -r '.[].unit'"
|
||||
register: systemd_timers_result
|
||||
register: lego_systemd_timers_result
|
||||
changed_when: false
|
||||
|
||||
- name: Generate systemd timer names
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: false
|
||||
loop: "{{ systemd_timers_result.stdout_lines | difference(lego_systemd_timers) }}"
|
||||
loop: "{{ lego_systemd_timers_result.stdout_lines | difference(lego_systemd_timers) }}"
|
||||
become: true
|
||||
|
||||
- name: Enable the system timers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue