Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yogesh174/938673e0973f6869174b82cd514fdbe9 to your computer and use it in GitHub Desktop.
Save yogesh174/938673e0973f6869174b82cd514fdbe9 to your computer and use it in GitHub Desktop.
Multi-cloud K8s cluster with Terraform and Ansible
- name: "Wait till nodes are reachable"
hosts: azure-k8s-nodes
gather_facts: no
tasks:
- name: "Wait for system to become reachable"
wait_for_connection:
- hosts: azure-k8s-nodes
gather_facts: no
tasks:
- name: "Get the env var"
shell: "source /etc/profile.d/terraform.sh; echo $IS_CONFIGURED"
args:
executable: /bin/bash
register: configured
- name: "Include require-config play"
import_playbook: "require-config.yaml"
when: configured.stdout | default(0) != '1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment