Compare commits

...
4 Commits
3 changed files with 16 additions and 11 deletions

No files matched your search

+6 -2
View File
@@ -5,7 +5,7 @@
DIR="$(dirname -- "${BASH_SOURCE[0]}")"
PROG="$(basename -- "${BASH_SOURCE[0]}")"
LOCAL=$DIR/local.yml
LOCAL="$DIR/local.yml"
URL="https://git.hyperling.com/me/env-ansible"
if [[ -z $BRANCH ]]; then
export BRANCH="main"
@@ -211,14 +211,18 @@ fi
echo "Verifying this is the only run..."
ps -ef | grep ansible-playbook | grep -v grep
ansible_exists="$?"
lock_file=/tmp/ansible-playbook.lock
if [[ "$ansible_exists" == 0 ]]; then
echo "Playbook is already being executed. Exiting."
exit 0
elif [[ -e "$lock_file" ]]; then
echo "Playbook not being executed. Removing lock file."
sudo mv -v "$lock_file" "${lock_file}.disabled"
fi
echo "- Verified!"
echo "Provisioning Ansible..."
if [[ $local == "Y" ]]; then
if [[ "$local" == "Y" ]]; then
sudo ansible-playbook $LOCAL
else
sudo ansible-pull -U $URL.git --checkout $branch
+2 -1
View File
@@ -692,7 +692,8 @@
hugo-rvr dev
nomadic-weather dev
nomadic-weather.wiki main
EOF
EOF
# Above EOF cannot be indented unless using a tab, which would be mixed with spaces.
}
function code_seed() {
# Git repo information.
+8 -8
View File
@@ -27,8 +27,8 @@
- name: Workstation | Linux | Software | Android | Facts [3/3]
set_fact:
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/sdkmanager"
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/sdkmanager"
android_sdkmanager_temp: "{{ android_sdk_cmdline_temp }}/cmdline-tools/bin/android sdk"
android_sdkmanager_final: "{{ android_sdk_cmdline_final }}/android sdk"
# Regarding images to download; the `default` is the smallest, then `playstore`.
# The `google_apis` images are significantly larger than the `playstore` option.
@@ -229,7 +229,7 @@
# This can only be run once, otherwise cmdline-tools creates latest-* folders.
- name: Workstation | Linux | Software | Android | Install | Consistent Modules
shell: "yes | {{ android_sdkmanager_temp }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: "yes | {{ android_sdkmanager_temp }} install '{{ item }}' --sdk={{ android_sdk_location }}"
loop:
# Current
- cmdline-tools/latest
@@ -243,7 +243,7 @@
- name: Workstation | Linux | Software | Android | Install | Required Modules
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
yes | {{ android_sdkmanager_final }} install '{{ item }}' --sdk={{ android_sdk_location }}
fi
loop: "{{ android_downloads_required }}"
become_user: "{{ user }}"
@@ -253,7 +253,7 @@
- name: Workstation | Linux | Software | Android | Install | Additional Modules
shell: |
if ! {{ android_sdkmanager_final }} --list_installed | grep -q '{{ item }}'; then
yes | {{ android_sdkmanager_final }} --install '{{ item }}' --sdk_root={{ android_sdk_location }}
yes | {{ android_sdkmanager_final }} install '{{ item }}' --sdk={{ android_sdk_location }}
fi
loop: "{{ android_downloads_additional }}"
become_user: "{{ user }}"
@@ -262,7 +262,7 @@
# Remove extra downloads if system is not meant for full amount of testing.
- name: Workstation | Linux | Software | Android | Uninstall | Additional Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: "yes | {{ android_sdkmanager_final }} remove '{{ item }}' --sdk={{ android_sdk_location }}"
loop: "{{ android_downloads_additional }}"
become_user: "{{ user }}"
when: coding != true
@@ -271,14 +271,14 @@
# Remove any versions which used to be part of this script and no longer used.
- name: Workstation | Linux | Software | Android | Uninstall | Unused Modules
shell: "yes | {{ android_sdkmanager_final }} --uninstall '{{ item }}' --sdk_root={{ android_sdk_location }}"
shell: "yes | {{ android_sdkmanager_final }} remove '{{ item }}' --sdk={{ android_sdk_location }}"
loop: "{{ android_downloads_unused }}"
become_user: "{{ user }}"
when: coding == true
# Report the currently installed packges.
- name: Workstation | Linux | Software | Android | Report Modules
shell: "{{ android_sdkmanager_final }} --list_installed --sdk_root={{ android_sdk_location }} > {{ android_report_file }}"
shell: "{{ android_sdkmanager_final }} list --sdk={{ android_sdk_location }} > {{ android_report_file }}"
become_user: "{{ user }}"
when: coding == true