Bugfixes (#27)
* Fix variable sticking. * Use unset instead of empty string. * Bugfix for Arch. Output enhancement for FreeBSD. * Fix cron action for Debian.
This commit is contained in:
parent
b644ba9479
commit
cb9ae5eb18
@ -74,8 +74,11 @@
|
||||
- name: General | Facts | Package | Update Commands | pacman
|
||||
set_fact:
|
||||
update_package_manager: |
|
||||
echo "*** Pacman ***" &&
|
||||
sudo pacman -Syyu {{ update_accept_var }} &&
|
||||
echo "*** Pacman ***"
|
||||
if [[ "$accept" == "Y" ]]; then
|
||||
auto_accept="{{ update_accept_var }}"
|
||||
fi
|
||||
sudo pacman -Syyu $auto_accept &&
|
||||
when: ansible_pkg_mgr == "pacman"
|
||||
|
||||
- name: General | Facts | Package | Update Commands | pkg
|
||||
@ -85,6 +88,7 @@
|
||||
clean=""
|
||||
[[ "{{ update_accept_var }}" == "-y" ]] || echo "Are you sure you'd like to clean /var/db/freebsd-update? [y/N] "
|
||||
[[ "{{ update_accept_var }}" == "-y" ]] || read -N 1 clean
|
||||
echo -e "\n"
|
||||
typeset -l clean
|
||||
if [[ "{{ update_accept_var }}" == "-y" || "$clean" == "y" ]]; then
|
||||
echo "Cleaning directory..."
|
||||
|
@ -194,6 +194,8 @@
|
||||
function_check_trash: |
|
||||
function check-trash() {
|
||||
unset OPTIND
|
||||
unset clean
|
||||
unset network
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
-c | -y | --clean ) clean="Y" ;;
|
||||
|
@ -177,14 +177,14 @@
|
||||
## Cron ##
|
||||
|
||||
- name: Server | Software | HTTPS Git Server | Cron | Hourly
|
||||
ansible.builtin.cron:
|
||||
cron:
|
||||
name: "{{ item.name }} hourly"
|
||||
special_time: hourly
|
||||
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
||||
loop: "{{ git_projects }}"
|
||||
|
||||
- name: Server | Software | HTTPS Git Server | Cron | Reboot
|
||||
ansible.builtin.cron:
|
||||
cron:
|
||||
name: "{{ item.name }} reboot"
|
||||
special_time: reboot
|
||||
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user