diff --git a/CHANGELOG.md b/CHANGELOG.md index 02bc3c49..46cbeaa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,13 +14,14 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Added * autosysadmin-agent: upstream release 24.02.3 -* autosysadmin-agent: logs clearing is done weekly * certbot: Renewal hook for NRPE * kvm-host: add minifirewall rules if DRBD interface is configured ### Changed * apt: add ftp.evolix.org as recognized system source +* autosysadmin-agent: logs clearing is done weekly +* autosysadmin-agent: rename /usr/share/scripts/autosysadmin/{auto,restart} * lxc-php, php: Update sury PGP key * redis: create sysfs config file if missing * openvpn: earlier alert for CA expiration diff --git a/autosysadmin-agent/defaults/main.yml b/autosysadmin-agent/defaults/main.yml index 340ec0a1..b223a683 100644 --- a/autosysadmin-agent/defaults/main.yml +++ b/autosysadmin-agent/defaults/main.yml @@ -4,7 +4,7 @@ general_scripts_dir: "/usr/share/scripts" autosysadmin_agent_bin_dir: "/usr/local/bin/autosysadmin" autosysadmin_agent_lib_dir: "/usr/local/lib/autosysadmin" -autosysadmin_agent_auto_dir: "{{ general_scripts_dir }}/autosysadmin/auto" +autosysadmin_agent_auto_dir: "{{ general_scripts_dir }}/autosysadmin/restart" autosysadmin_agent_crontab_enabled: true autosysadmin_agent_log_retention_days: 365 diff --git a/autosysadmin-agent/files/upstream/restart/README b/autosysadmin-agent/files/upstream/restart/README index 137a7436..5ac200f2 100644 --- a/autosysadmin-agent/files/upstream/restart/README +++ b/autosysadmin-agent/files/upstream/restart/README @@ -13,7 +13,7 @@ Warning: scripts that do not satisfy those criteria will NOT be run (silently)! You can print the names of the scripts which would be run, without actually running them, with this command : ``` -$ run-parts --test /usr/share/scripts/autosysadmin/auto +$ run-parts --test /usr/share/scripts/autosysadmin/restart ``` You can use `zzz-restart_example.template` as boilerplate code to make your own "restart" script. diff --git a/autosysadmin-agent/tasks/install.yml b/autosysadmin-agent/tasks/install.yml index d5e3b3eb..b8ecd752 100644 --- a/autosysadmin-agent/tasks/install.yml +++ b/autosysadmin-agent/tasks/install.yml @@ -3,6 +3,12 @@ ansible.builtin.include_role: name: remount-usr +- name: Previous autosysadmin restart directory is renamed + command: + cmd: mv "/usr/share/scripts/autosysadmin/auto" "{{ autosysadmin_agent_auto_dir }}" + removes: "/usr/share/scripts/autosysadmin/auto" + creates: "{{ autosysadmin_agent_auto_dir }}" + - name: Create autosysadmin directories ansible.builtin.file: path: "{{ item }}" diff --git a/autosysadmin-agent/templates/autosysadmin.cron.j2 b/autosysadmin-agent/templates/autosysadmin.cron.j2 index 7f2e211b..90823d5e 100644 --- a/autosysadmin-agent/templates/autosysadmin.cron.j2 +++ b/autosysadmin-agent/templates/autosysadmin.cron.j2 @@ -1,7 +1,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # Run each enabled script -*/5 * * * * root run-parts /usr/share/scripts/autosysadmin/auto +*/5 * * * * root run-parts /usr/share/scripts/autosysadmin/restart # Clean run log files @weekly root {{ autosysadmin_agent_bin_dir | mandatory }}/delete_old_logs.sh {{ autosysadmin_agent_log_retention_days | default('365') }}