diff --git a/facts/general/package.yml b/facts/general/package.yml index 7ea15eb..76abb6f 100644 --- a/facts/general/package.yml +++ b/facts/general/package.yml @@ -71,17 +71,24 @@ parrot_mirrors_suck=true sudo apt update --fix-missing fi - done + done && when: ansible_distribution == "Parrot OS" -- name: General | Facts | Package | Update Commands | flatpak (Linux) + +- name: General | Facts | Package | Update Commands | flatpak | check + shell: which flatpak + register: flatpak_exec + ignore_errors: yes + +- name: General | Facts | Package | Update Commands | flatpak | exists set_fact: update_flatpak: | - echo "*** Flatpak ***" && - flatpak update && - when: ansible_system == "Linux" - -- name: General | Facts | Package | Update Commands | flatpak (FreeBSD) + echo "*** Flatpak ***" && + flatpak update {{ update_accept_var }} && + when: flatpak_exec is defined and flatpak_exec.failed is defined and not flatpak_exec.failed + +- name: General | Facts | Package | Update Commands | flatpak | not exists set_fact: - update_flatpak: echo "*** No Flatpak ***" - when: ansible_system == "FreeBSD" + update_flatpak: | + echo "*** Flatpak Not Installed ***" && + when: update_flatpak is not defined diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index fe77337..6c48dcd 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -120,8 +120,8 @@ PROG=$FUNCNAME usage="Usage: $PROG [-y] $PROG is used to run all the system's package manager commands - in one swoop. Flow stops if any command returns a failure code. - The hope is to run something as easy as 'pacman -Syyu'. + in one swoop. Flow stops if any command returns a failure code. + The hope is to run something as easy as 'pacman -Syyu'. -y : Assume yes to any prompts." unset OPTIND @@ -140,7 +140,7 @@ {{ update_flatpak }} return 0 - echo "$PROG experienced a problem and has aborted." + echo "ERROR: $PROG experienced a problem and has aborted." return 1 } diff --git a/tasks/general/scripts/root.yml b/tasks/general/scripts/root.yml index 94681e8..b15180e 100644 --- a/tasks/general/scripts/root.yml +++ b/tasks/general/scripts/root.yml @@ -49,7 +49,7 @@ # Use a specific branch if it was asked for. branch="dev" if [[ $1 != "" ]]; then - branch="$1" + branch="$1" fi diff --git a/tasks/general/scripts/user.yml b/tasks/general/scripts/user.yml index e30ca8b..69a0226 100644 --- a/tasks/general/scripts/user.yml +++ b/tasks/general/scripts/user.yml @@ -49,7 +49,7 @@ # Use a specific branch if it was asked for. branch="dev" if [[ $1 != "" ]]; then - branch="$1" + branch="$1" fi