Compare commits

..
4 Commits
3 changed files with 15 additions and 10 deletions

No files matched your search

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