diff --git a/.gitignore b/.gitignore index 2f36132..620a9b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # ---> Ansible *.retry +EXAMPLES diff --git a/README.md b/README.md index 279517f..1d9eea3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ -# ansible +# Ansible -HPetersenFamily.com Ansible Configuration \ No newline at end of file +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 diff --git a/bootstrap.sh b/bootstrap.sh index 7b8375e..8cf8d91 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 +