Skip to content

Commit

Permalink
Save the ansible invocation to a script for later reuse
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Aug 23, 2019
1 parent 210c95a commit 3539c48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clojurians_log/userdata.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,10 @@ base64 --decode < vars/clojurians_log_secrets.yml.b64 > vars/clojurians_log_secr
# Bootstrap the instance
ansible-playbook bootstrap.yml -i hosts >> ~/ansible.log

# Create a script for ansible, so it's easy to re-run at a later date
echo '#/bin/sh' >> ~/run_ansible
echo 'HOME=/root ansible-playbook clojurians-log.yml -i hosts ${ansible_playbook_params} "$@"' >> ~/run_ansible
chmod +x ~/run_ansible

# Setup clojurians_log
HOME=/root ansible-playbook clojurians-log.yml -i hosts ${ansible_playbook_params} >> ~/ansible.log
~/run_ansible

0 comments on commit 3539c48

Please sign in to comment.