Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement