enabled timing; improved rpi patch handling

This commit is contained in:
2021-05-21 10:13:26 +02:00
parent e647019b55
commit 5260f77b05
4 changed files with 46 additions and 36 deletions

5
ansible.cfg Normal file → Executable file
View File

@ -1,2 +1,3 @@
[defaults] [defaults]
inventory=inventory inventory=inventory
callback_whitelist = profile_tasks

View File

@ -1,18 +1,18 @@
[rpi:children] [rpi:children]
rpi_rpios rpi_rpios
rpi_ubuntu rpi_ubuntu
[rpi_ubuntu] [rpi_ubuntu]
piprint ansible_host=192.168.2.95 piprint ansible_host=192.168.2.95
[rpi_ubuntu:vars] [rpi_ubuntu:vars]
ansible_user=ubuntu ansible_user=ubuntu
[rpi_rpios] [rpi_rpios]
octopi ansible_host=192.168.2.99 octopi ansible_host=192.168.2.99
pihole ansible_host=192.168.2.20 pihole ansible_host=192.168.2.20
naspi ansible_host=192.168.2.75 naspi ansible_host=192.168.2.75
[rpi_rpios:vars] [rpi_rpios:vars]
ansible_user=pi ansible_user=pi

14
playbooks/disabled_unattended-upgrades.yml Normal file → Executable file
View File

@ -1,8 +1,8 @@
- hosts: rpi - hosts: rpi
become: yes become: yes
tasks: tasks:
- name: remove unattended-upgrades - name: remove unattended-upgrades
apt: apt:
package: unattended-upgrades package: unattended-upgrades
state: absent state: absent
autoremove: yes autoremove: yes

29
playbooks/rpi_patches.yml Normal file → Executable file
View File

@ -1,10 +1,19 @@
- hosts: rpi - hosts: rpi
become: yes become: yes
tasks: tasks:
- name: Apt Update - name: Apt Update
apt: apt:
update_cache: yes update_cache: yes
- name: Apt Upgrade - name: Apt Upgrade
apt: apt:
upgrade: safe upgrade: safe
- name: Check if reboot required
stat:
path: /var/run/reboot-required
register: reboot_required_file
- name: Reboot if required
reboot:
when: reboot_required_file.stat.exists == true