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
|
|
@ -8,9 +8,10 @@
|
|||
- name: Install wanted software
|
||||
ansible.builtin.apt:
|
||||
pkg:
|
||||
- jq
|
||||
- bzip2
|
||||
- jq
|
||||
- rclone
|
||||
- zsh
|
||||
state: present
|
||||
update_cache: true
|
||||
become: true
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
- name: Check if autorestic is installed
|
||||
ansible.builtin.stat:
|
||||
path: /usr/local/bin/autorestic
|
||||
register: autorestic_status
|
||||
register: software_autorestic_status
|
||||
|
||||
- name: Install autorestic
|
||||
ansible.builtin.shell:
|
||||
executable: /usr/bin/bash
|
||||
cmd: set -o pipefail && wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
|
||||
when: not autorestic_status.stat.exists
|
||||
when: not software_autorestic_status.stat.exists
|
||||
changed_when: true
|
||||
become: true
|
||||
|
||||
- name: Check if restic is installed
|
||||
ansible.builtin.stat:
|
||||
path: /usr/local/bin/restic
|
||||
register: restic_status
|
||||
register: software_restic_status
|
||||
|
||||
- name: Install restic
|
||||
ansible.builtin.command: autorestic install
|
||||
when: not restic_status.stat.exists
|
||||
when: not software_restic_status.stat.exists
|
||||
changed_when: true
|
||||
become: true
|
||||
|
|
|
|||
|
|
@ -14,26 +14,19 @@
|
|||
owner: "root"
|
||||
group: "root"
|
||||
become: true
|
||||
register: systemd_resolved_config
|
||||
notify:
|
||||
- Restart tailscaled
|
||||
- Restart systemd-resolved
|
||||
|
||||
- name: Enable systemd-resolved and (re)start
|
||||
- name: Enable and systemd-resolved
|
||||
ansible.builtin.systemd_service:
|
||||
name: systemd-resolved.service
|
||||
state: "{{ 'restarted' if systemd_resolved_config.changed else 'started' }}"
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
become: true
|
||||
register: systemd_resolved_started
|
||||
|
||||
- name: Restart other dns-related services
|
||||
ansible.builtin.systemd_service:
|
||||
name: "{{ item }}.service"
|
||||
state: restarted
|
||||
daemon_reload: true
|
||||
become: true
|
||||
when: systemd_resolved_started.changed # noqa: no-handler TODO can we add a handler here?
|
||||
loop:
|
||||
- tailscaled
|
||||
notify:
|
||||
- Restart tailscaled
|
||||
|
||||
- name: Create resolv.conf symlink
|
||||
ansible.builtin.file:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue