This commit is contained in:
2026-07-04 15:56:46 -05:00
parent 46ff5e9d74
commit 2179a2fd3b
3 changed files with 16 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
# ---> Ansible
*.retry
EXAMPLES
+6 -2
View File
@@ -1,3 +1,7 @@
# ansible
# Ansible
HPetersenFamily.com Ansible Configuration
HPetersenFamily.com Ansible Configuration
* curl -s https://gitea.admin-a.hpetersenfamily.com/heath/ansible/raw/branch/main/bootstrap.sh | sudo /bin/bash
* ansible-pull will look for host.fqdn.yml, host.yml, then local.yml
+9 -3
View File
@@ -87,13 +87,19 @@ fi
venv_dir=~hpf-ans/.ansible-venv
venv_script="$venv_dir/bin/activate"
if [ ! -f "$venv_script" ] ; then
su --login hpf-ans -c "python3 -m venv \"$venv_dir\""
su --login hpf-ans -c \
"python3 -m venv \"$venv_dir\""
fi
# Make sure pip is up to date in .ansible-venv
su --login hpf-ans -c "source \"$venv_script\"; pip install --upgrade pip"
su --login hpf-ans -c \
"source \"$venv_script\"; pip install --upgrade pip"
# Make sure ansible is installed in .ansible-venv
if ! su --login hpf-ans -c "source \"$venv_script\"; which -s ansible" ; then
su --login hpf-ans -c "source \"$venv_script\"; pip install ansible"
su --login hpf-ans -c \
"source \"$venv_script\"; pip install ansible"
fi
#### ansible-pull --only-if-changed -U https://gitea.admin-a.hpetersenfamily.com/heath/ansible.git 2>&1 | sudo tee -a /var/log/ansible-pull.log