Skip to content

Instantly share code, notes, and snippets.

@futurealecks
Last active June 22, 2016 16:58
Show Gist options
  • Save futurealecks/f3b2602ad4b8925db5159367830dd635 to your computer and use it in GitHub Desktop.
Save futurealecks/f3b2602ad4b8925db5159367830dd635 to your computer and use it in GitHub Desktop.
Skipping: No Hosts
[local]
localhost ansible_connection=local
[customerA]
local
ASK: [vyatta-endpoint | Add the new host IP to the group] ********************
creating host via 'add_host': hostname=52.x.y.z
added host to group via add_host module: vyos_entry1
PLAY [Configure the VyOS Entry Node] ******************************************
skipping: no hosts matched
- name: Provision the architecture topology
hosts: local
connection: local
roles:
- topology
- name: Provision the Instances
hosts: local
connection: local
roles:
- vyatta-endpoint
- name: Configure the VyOS Entry Node
hosts: vyos_entry1
remote_user: vyos
sudo: true
roles:
- role: vyatta-entry1-update
- name: Create Node
# register: vyatta_host
ec2:
region: '{{ aws_region }}'
key_name: '{{ aws_key_pair }}'
# instance_profile_name: node
instance_type: '{{ vyatta_instance_type }}'
image: '{{ vyatta_image_id }}'
vpc_subnet_id: '{{ aws_public_subnet_1_id }}'
group_id: '{{ vyos_sg.group_id }}'
wait: true
exact_count: 1
assign_public_ip: true
source_dest_check: false
instance_tags:
Name: com-entry1-{{ customer }}-{{ env }}
Customer: '{{ customer }}'
Environment: '{{ env }}'
Purpose: 'vyos'
count_tag:
Name: com-entry1-{{ customer }}-{{ env }}
register: ec2
- name: Wait for SSH to come up
wait_for: host={{ item.public_dns_name }} port=22 delay=60 timeout=320 state=started
with_items: ec2.instances
- name: Add the new host IP to the group
add_host: hostname={{ item.public_ip }} groups=vyos_entry1
with_items: ec2.instances
- debug: var=groups['vyos_entry1']
- name: upload the entry node configuration
template: src=vyos_entry_a.sh.j2 dest=/tmp/vyos_entry_a.sh mode=0755
register: result
#- name: run the configuration script
# command: /tmp/vyos_entry_a.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment