Automated changes from linter ;P

This commit is contained in:
Mark Janssen 2024-07-11 20:47:52 +02:00
parent 44b73a216f
commit f7f04e7a41
Signed by: foobar
GPG key ID: D8674D8FC4F69BD2
65 changed files with 392 additions and 324 deletions

View file

@ -1,2 +1,3 @@
---
- import_tasks: ../../common/handlers/main.yaml
- ansible.builtin.import_tasks:
file: ../../common/handlers/main.yaml

View file

@ -1,24 +1,25 @@
---
- name: Check whether user pi exists
command: "grep ^pi: /etc/passwd"
ansible.builtin.command:
cmd: 'grep ^pi: /etc/passwd'
changed_when: no
failed_when: pi_user_check.rc != 0 and pi_user_check.rc != 1
register: pi_user_check
- name: Disable default user
user:
ansible.builtin.user:
name: pi
password: !
when: pi_user_check.stdout_lines|length > 0
- name: Enable sshd
systemd:
ansible.builtin.systemd:
name: sshd
enabled: yes
state: started
- name: Rotate display
lineinfile:
ansible.builtin.lineinfile:
path: /boot/config.txt
line: "display_rotate={{ raspi_rotate_display }} # Managed by Ansible"
regexp: "^#?display_rotate"
@ -28,18 +29,19 @@
- name: Disable swap
block:
- name: Stop swap service
systemd:
ansible.builtin.systemd:
name: dphys-swapfile
state: stopped
enabled: no
- name: Remove swap file
command: dphys-swapfile uninstall
ansible.builtin.command:
cmd: dphys-swapfile uninstall
args:
removes: /var/swap
- name: Enable IPv6 SLAAC
lineinfile:
ansible.builtin.lineinfile:
path: /etc/dhcpcd.conf
line: "slaac hwaddr # Managed by Ansible"
regexp: "^#?slaac"