Commit ba013667 by Brian Beggs

Merge pull request #3100 from edx/bbeggs/host-inventory

GOCD Integration - an inventory file is now created when an instance is launched
parents 796d7953 cf57e905
......@@ -8,4 +8,9 @@ jinja2_extensions=jinja2.ext.do
host_key_checking=False
roles_path=../../../ansible-roles/roles:../../../ansible-private/roles:../../../ansible-roles/
library=../library/
# ControlPersist keeps the socket ssh creates open to the target. Increasing this timeout decreases
# some of the ssh overhead with all the ssh connections ansible makes by allowing it to just reuse the
# socket for each ssh session. This should improve performance since we are now running ansible remotely.
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o StrictHostKeyChecking=no
ansible_managed=This file is created and updated by ansible, edit at your peril
......@@ -90,4 +90,10 @@
dest: "{{ artifact_path }}/key.pem"
mode: 0600
- name: Generate ansible inventory file
template:
src: templates/local/inventory.j2
dest: "{{ artifact_path }}/ansible_inventory"
mode: 0600
{% for instance in ec2_instance_register.instances %}
{{ instance.private_ip }}
{% endfor %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment