This repository has been archived by the owner on May 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1136 from deNBI/dev
Dev
- Loading branch information
Showing
5 changed files
with
69 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 49 additions & 2 deletions
51
VirtualMachineService/ancon/playbooks/generic_playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,57 @@ | ||
- name: Setting up your virtual machine | ||
hosts: all | ||
hosts: vm | ||
become: yes | ||
connection: paramiko_ssh | ||
gather_facts: yes | ||
vars_files: | ||
pre_tasks: | ||
- name: PRE_TASK Disable unattended upgrades | ||
lineinfile: | ||
path: /etc/apt/apt.conf.d/10periodic | ||
regexp: "^APT::Periodic::Unattended-Upgrade" | ||
line: 'APT::Periodic::Unattended-Upgrade "0";' | ||
create: yes | ||
- name: PRE_TASK Stop apt-daily.* systemd services | ||
service: | ||
name: "{{ item }}" | ||
state: stopped | ||
with_items: | ||
- unattended-upgrades | ||
- apt-daily | ||
- apt-daily.timer | ||
- apt-daily-upgrade | ||
- apt-daily-upgrade.timer | ||
|
||
- name: PRE_TASK Wait for automatic system updates 1 | ||
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done; | ||
|
||
- name: PRE_TASK Wait for automatic system updates 2 | ||
shell: while sudo fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 1; done; | ||
|
||
- name: PRE_TASK Update apt cache | ||
become: true | ||
apt: | ||
upgrade: true | ||
update_cache: true | ||
autoremove: true | ||
autoclean: true | ||
|
||
tasks: | ||
- name: Setting up your virtual machine | ||
block: | ||
always: | ||
|
||
post_tasks: | ||
- name: POST_TASK enable unattended upgrades | ||
lineinfile: | ||
path: /etc/apt/apt.conf.d/10periodic | ||
regexp: "^APT::Periodic::Unattended-Upgrade" | ||
line: 'APT::Periodic::Unattended-Upgrade "1";' | ||
create: yes | ||
- name: POST_TASK Start apt-daily.* systemd services | ||
service: | ||
name: "{{ item }}" | ||
state: started | ||
with_items: | ||
- unattended-upgrades | ||
- apt-daily | ||
- apt-daily.timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,5 @@ paramiko==2.11.0 | |
ruamel.yaml==0.17.21 | ||
pyvim==3.0.3 | ||
redis==4.3.3 | ||
requests==2.27.1 | ||
requests==2.28.0 | ||
pyyaml==6.0 |