Automated changes from linter ;P
This commit is contained in:
parent
44b73a216f
commit
f7f04e7a41
65 changed files with 392 additions and 324 deletions
|
@ -1,2 +1,3 @@
|
|||
---
|
||||
- import_tasks: ../../common/handlers/main.yaml
|
||||
- ansible.builtin.import_tasks:
|
||||
file: ../../common/handlers/main.yaml
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue