From 9d5d211ac4825f99a2c56e45a2dd205227d10e1d Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 4 Sep 2022 17:25:14 +0200 Subject: [PATCH] make linter happy --- deploy.yml | 7 ++++--- hosts.yml | 1 + roles/basic/tasks/main.yml | 1 + roles/sshd/tasks/alpine.yml | 3 ++- roles/sshd/tasks/certs.yml | 1 + roles/sshd/tasks/main.yml | 1 + roles/tinyproxy/tasks/main.yml | 5 +++-- roles/users/meta/main.yml | 1 + roles/users/tasks/ansible.yml | 3 ++- roles/users/tasks/main.yml | 1 + roles/users/tasks/rilla.yml | 5 +++-- roles/users/tasks/woodpecker.yml | 5 +++-- roles/wheel/tasks/alpine.yml | 1 + roles/wheel/tasks/main.yml | 1 + roles/wheel/tasks/sudo.yml | 1 + roles/wifi/tasks/main.yml | 7 ++++--- roles/wifi/vars/main.yml | 1 + 17 files changed, 31 insertions(+), 14 deletions(-) diff --git a/deploy.yml b/deploy.yml index 36de8a3..f53b894 100644 --- a/deploy.yml +++ b/deploy.yml @@ -1,6 +1,7 @@ +--- - name: snitch deployment hosts: snitch - become: yes + become: true become_method: doas roles: - basic @@ -19,7 +20,7 @@ - name: caladan deployment hosts: caladan - become: yes + become: true become_method: doas roles: - basic @@ -35,7 +36,7 @@ - name: narwhal deployment hosts: narwhal - become: yes + become: true become_method: sudo roles: - basic diff --git a/hosts.yml b/hosts.yml index 7ebb225..77171fb 100644 --- a/hosts.yml +++ b/hosts.yml @@ -1,3 +1,4 @@ +--- all: hosts: diff --git a/roles/basic/tasks/main.yml b/roles/basic/tasks/main.yml index 54798d5..0855457 100644 --- a/roles/basic/tasks/main.yml +++ b/roles/basic/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: install python3 apk: name: python3 diff --git a/roles/sshd/tasks/alpine.yml b/roles/sshd/tasks/alpine.yml index 2305ea8..1b36f3e 100644 --- a/roles/sshd/tasks/alpine.yml +++ b/roles/sshd/tasks/alpine.yml @@ -1,3 +1,4 @@ +--- - name: install openssh apk: name: openssh @@ -5,5 +6,5 @@ - name: enable sshd service service: name: sshd - enabled: yes + enabled: true state: started diff --git a/roles/sshd/tasks/certs.yml b/roles/sshd/tasks/certs.yml index 72fdf01..578b8c0 100644 --- a/roles/sshd/tasks/certs.yml +++ b/roles/sshd/tasks/certs.yml @@ -1,3 +1,4 @@ +--- - name: ssh_host_ed25519_key-cert.pub copy: src: "host_files/{{ ansible_hostname }}/ssh_host_ed25519_key-cert.pub" diff --git a/roles/sshd/tasks/main.yml b/roles/sshd/tasks/main.yml index 38cd7df..a1aacad 100644 --- a/roles/sshd/tasks/main.yml +++ b/roles/sshd/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: set sshd config template: src: sshd_config.j2 diff --git a/roles/tinyproxy/tasks/main.yml b/roles/tinyproxy/tasks/main.yml index 1939aa1..0533d7a 100644 --- a/roles/tinyproxy/tasks/main.yml +++ b/roles/tinyproxy/tasks/main.yml @@ -2,6 +2,7 @@ # * curl icanhazip.com # * http_proxy=caladan:8888 curl icanhazip.com +--- - name: install tinyproxy apk: name: tinyproxy @@ -19,7 +20,7 @@ service: name: tinyproxy state: started - enabled: yes + enabled: true when: ansible_distribution == "Alpine" - name: set awall firewall rule @@ -35,5 +36,5 @@ awall: name: tinyproxy state: enabled - activate: yes + activate: true when: ansible_distribution == "Alpine" diff --git a/roles/users/meta/main.yml b/roles/users/meta/main.yml index dc3020c..3033644 100644 --- a/roles/users/meta/main.yml +++ b/roles/users/meta/main.yml @@ -1,2 +1,3 @@ +--- dependencies: - role: wheel diff --git a/roles/users/tasks/ansible.yml b/roles/users/tasks/ansible.yml index 2fc715b..ce60c6f 100644 --- a/roles/users/tasks/ansible.yml +++ b/roles/users/tasks/ansible.yml @@ -1,3 +1,4 @@ +--- - name: create group 'ansible' group: name: ansible @@ -12,7 +13,7 @@ password: "*" # disabled password but can be accessed with SSH groups: - wheel - append: yes + append: true - name: make sure ansible owns its home file: diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index c634162..58ed0bb 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: create group 'deploy' group: name: deploy diff --git a/roles/users/tasks/rilla.yml b/roles/users/tasks/rilla.yml index e172bb9..26327b3 100644 --- a/roles/users/tasks/rilla.yml +++ b/roles/users/tasks/rilla.yml @@ -1,3 +1,4 @@ +--- - name: create group 'rilla' group: name: rilla @@ -12,13 +13,13 @@ groups: - deploy - wheel - append: yes + append: true - name: additional groups to rilla user: name: rilla groups: "{{item}}" - append: yes + append: true when: item in ansible_facts.getent_group with_items: - docker diff --git a/roles/users/tasks/woodpecker.yml b/roles/users/tasks/woodpecker.yml index 23246da..9f6f5a8 100644 --- a/roles/users/tasks/woodpecker.yml +++ b/roles/users/tasks/woodpecker.yml @@ -1,3 +1,4 @@ +--- - name: create group 'woodpecker' group: name: woodpecker @@ -12,13 +13,13 @@ password: "*" # disabled password but can be accessed with SSH groups: - deploy - append: yes + append: true - name: additional groups to woodpecker user: name: woodpecker groups: "{{item}}" - append: yes + append: true when: item in ansible_facts.getent_group with_items: - docker diff --git a/roles/wheel/tasks/alpine.yml b/roles/wheel/tasks/alpine.yml index b14dedd..6318f17 100644 --- a/roles/wheel/tasks/alpine.yml +++ b/roles/wheel/tasks/alpine.yml @@ -1,3 +1,4 @@ +--- - name: install doas apk: name: doas diff --git a/roles/wheel/tasks/main.yml b/roles/wheel/tasks/main.yml index 6948dfc..7abe164 100644 --- a/roles/wheel/tasks/main.yml +++ b/roles/wheel/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: create 'wheel' group group: name: wheel diff --git a/roles/wheel/tasks/sudo.yml b/roles/wheel/tasks/sudo.yml index efe4792..fe7fe4c 100644 --- a/roles/wheel/tasks/sudo.yml +++ b/roles/wheel/tasks/sudo.yml @@ -1,3 +1,4 @@ +--- - name: install sudo apt: name: sudo diff --git a/roles/wifi/tasks/main.yml b/roles/wifi/tasks/main.yml index 4a8a0f3..9b01fc5 100644 --- a/roles/wifi/tasks/main.yml +++ b/roles/wifi/tasks/main.yml @@ -1,3 +1,4 @@ +--- - name: install wpa-supplicant (alpine) apk: name: wpa_supplicant @@ -21,7 +22,7 @@ service: name: wpa_supplicant state: started - enabled: yes + enabled: true runlevel: boot when: ansible_distribution == "Alpine" @@ -29,7 +30,7 @@ service: name: networking state: started - enabled: yes + enabled: true runlevel: boot when: ansible_distribution == "Alpine" @@ -45,6 +46,6 @@ service: name: wpa_cli state: started - enabled: yes + enabled: true runlevel: boot when: ansible_distribution == "Alpine" diff --git a/roles/wifi/vars/main.yml b/roles/wifi/vars/main.yml index b655436..d8fafa4 100644 --- a/roles/wifi/vars/main.yml +++ b/roles/wifi/vars/main.yml @@ -1,3 +1,4 @@ +--- wifi_ssid: CocoPeach wifi_psk: !vault |