Created
July 10, 2019 07:26
-
-
Save markuman/61e15c77fce0058cfeeebdd8a502d7b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Wait for SSH to come up | |
wait_for: | |
host: "{{ instance.instances[0].private_ip_address }}" | |
port: 22 | |
state: started | |
- name: Add all instance public IPs to host group # this is only temporary and not permanent | |
add_host: hostname={{ instance.instances[0].private_ip_address }} groups=tmp | |
- hosts: tmp | |
name: init configuration play | |
user: admin | |
gather_facts: False | |
tasks: | |
- name: set hostname from previous play | |
set_fact: | |
hostname: "{{ hostvars['localhost']['this_hostname'] }}" | |
init: "{{ hostvars['localhost']['init'] }}" | |
- name: init debian | |
include_role: | |
name: debian | |
tasks_from: init | |
when: init | bool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment