Skip to content

Commit

Permalink
Added apt-reactivate-auto-update to reactivate updates at the end of …
Browse files Browse the repository at this point in the history
…the playbook run (#518)

* changed theia to 900. Added apt-reactivate-auto-update as new 999.

* added new line at end of file

* changed list representation
  • Loading branch information
XaverStiensmeier authored Aug 16, 2024
1 parent 8dbab38 commit 51e9e2e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "1";
APT::Periodic::Unattended-Upgrade "1";
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- name: Disable auto-update/upgrade during ansible-run
copy:
src: enable-auto-upgrades.conf
dest: /etc/apt/apt.conf.d/20auto-upgrades
owner: root
group: root
mode: 0644
57 changes: 41 additions & 16 deletions resources/playbook/roles/bibigrid/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@

- name: Setup common software and dependencies for Debian
when: "ansible_distribution_file_variety == 'Debian'"
tags: ["pkg"]
tags:
- "pkg"
block:
- name: Running 001-apt.yaml
debug:
Expand All @@ -40,39 +41,44 @@

- name: Setup common software and dependencies for RedHat
when: "ansible_distribution_file_variety == 'RedHat'"
tags: ["pkg"]
tags:
- "pkg"
block:
- debug:
msg: "[BIBIGRID] Setup common software and dependencies"
- import_tasks: 001-yum.yaml

- name: Configure Wireguard for VPNs
when: "'vpn' in group_names and wireguard is defined"
tags: ["vpn"]
tags: "vpn"
block:
- debug:
msg: "[BIBIGRID] Configure Wireguard for VPNs"
- import_tasks: 002-wireguard-vpn.yaml

- name: Setup DNS
when: "'master' in group_names"
tags: ["dns"]
tags:
- "dns"
block:
- debug:
msg: "[BIBIGRID] Setup DNS"
- import_tasks: 003-dns.yaml

- name: Update host file on worker
when: "'workers' in group_names"
tags: ["host"]
tags:
- "host"
block:
- debug:
msg: "[BIBIGRID] Update hosts"
- import_tasks: 004-update-hosts.yaml

- name: Configure database
when: "'master' in group_names"
tags: ["database", "slurm"]
tags:
- "database"
- "slurm"
block:
- debug:
msg: "[BIBIGRID] Configure database"
Expand All @@ -81,7 +87,8 @@
- name: Setup additional binary executables /usr/local/bin/
when:
- "'master' in group_names"
tags: ["bin"]
tags:
- "bin"
block:
- debug:
msg: "[BIBIGRID] Setup additional binary executables /usr/local/bin/"
Expand All @@ -90,7 +97,8 @@
- name: Setup Zabbix Agent
when:
- enable_zabbix|default(false)|bool
tags: ["zabbix"]
tags:
- "zabbix"
block:
- debug:
msg: "[BIBIGRID] Setup Zabbix Agent"
Expand All @@ -102,20 +110,24 @@
msg: "[BIBIGRID] Generate directory structure available on all hosts"
- name: Generate general directory structure available on all hosts
import_tasks: 020-disk.yaml
tags: ["disk"]
tags:
- "disk"
- name: Generate server directory structure available on all hosts
import_tasks: 020-disk-server.yaml
when: "'master' in group_names"
tags: ["disk"]
tags:
- "disk"
- name: Generate worker directory structure available on all hosts
import_tasks: 020-disk-worker.yaml
when: "'master' not in group_names"
tags: ["disk"]
tags:
- "disk"

- name: Setup NFS
when:
- enable_nfs|default(false)|bool
tags: ["nfs"]
tags:
- "nfs"
block:
- debug:
msg: "[BIBIGRID] Setup NFS"
Expand All @@ -128,10 +140,12 @@
debug:
msg: "[BIBIGRID] Setup Docker"
- import_tasks: 030-docker.yaml
tags: ["docker"]
tags:
- "docker"

- name: Setup Slurm
tags: ["slurm"]
tags:
- "slurm"
block:
- debug:
msg: "[BIBIGRID] Setup Slurm"
Expand All @@ -144,8 +158,19 @@
when:
- enable_ide|default(false)|bool
- "'master' in group_names"
tags: ["theia"]
tags:
- "theia"
block:
- debug:
msg: "[BIBIGRID] Setup Theia"
- import_tasks: 999-theia.yaml
- import_tasks: 900-theia.yaml

- name: APT Reactivate Auto Update
when: "ansible_distribution_file_variety == 'Debian'"
tags:
- "pkg"
block:
- name: Running 999-apt-reactivate-auto-update.yaml
debug:
msg: "[BIBIGRID] APT Reactivate Auto Update"
- import_tasks: 999-apt-reactivate-auto-update.yaml

0 comments on commit 51e9e2e

Please sign in to comment.