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
|
- name: General | Facts | Package | Update Commands | pacman
|
||||||
set_fact:
|
set_fact:
|
||||||
update_package_manager: |
|
update_package_manager: |
|
||||||
echo "*** Pacman ***" &&
|
echo "*** Pacman ***"
|
||||||
sudo pacman -Syyu {{ update_accept_var }} &&
|
if [[ "$accept" == "Y" ]]; then
|
||||||
|
auto_accept="{{ update_accept_var }}"
|
||||||
|
fi
|
||||||
|
sudo pacman -Syyu $auto_accept &&
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
|
|
||||||
- name: General | Facts | Package | Update Commands | pkg
|
- name: General | Facts | Package | Update Commands | pkg
|
||||||
@ -85,6 +88,7 @@
|
|||||||
clean=""
|
clean=""
|
||||||
[[ "{{ update_accept_var }}" == "-y" ]] || echo "Are you sure you'd like to clean /var/db/freebsd-update? [y/N] "
|
[[ "{{ 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
|
[[ "{{ update_accept_var }}" == "-y" ]] || read -N 1 clean
|
||||||
|
echo -e "\n"
|
||||||
typeset -l clean
|
typeset -l clean
|
||||||
if [[ "{{ update_accept_var }}" == "-y" || "$clean" == "y" ]]; then
|
if [[ "{{ update_accept_var }}" == "-y" || "$clean" == "y" ]]; then
|
||||||
echo "Cleaning directory..."
|
echo "Cleaning directory..."
|
||||||
|
@ -194,6 +194,8 @@
|
|||||||
function_check_trash: |
|
function_check_trash: |
|
||||||
function check-trash() {
|
function check-trash() {
|
||||||
unset OPTIND
|
unset OPTIND
|
||||||
|
unset clean
|
||||||
|
unset network
|
||||||
while (( $# > 0 )); do
|
while (( $# > 0 )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
-c | -y | --clean ) clean="Y" ;;
|
-c | -y | --clean ) clean="Y" ;;
|
||||||
|
@ -177,14 +177,14 @@
|
|||||||
## Cron ##
|
## Cron ##
|
||||||
|
|
||||||
- name: Server | Software | HTTPS Git Server | Cron | Hourly
|
- name: Server | Software | HTTPS Git Server | Cron | Hourly
|
||||||
ansible.builtin.cron:
|
cron:
|
||||||
name: "{{ item.name }} hourly"
|
name: "{{ item.name }} hourly"
|
||||||
special_time: hourly
|
special_time: hourly
|
||||||
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
||||||
loop: "{{ git_projects }}"
|
loop: "{{ git_projects }}"
|
||||||
|
|
||||||
- name: Server | Software | HTTPS Git Server | Cron | Reboot
|
- name: Server | Software | HTTPS Git Server | Cron | Reboot
|
||||||
ansible.builtin.cron:
|
cron:
|
||||||
name: "{{ item.name }} reboot"
|
name: "{{ item.name }} reboot"
|
||||||
special_time: reboot
|
special_time: reboot
|
||||||
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
job: "cd {{ git_web_root }}/{{ item.name }}.git && {{ git_cron_commands }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user