Petr OspalĂ˝ | 1ae0393 | 2018-12-19 14:57:05 +0100 | [diff] [blame] | 1 | --- |
| 2 | - name: Install binaries for controlling deployment |
| 3 | hosts: infrastructure |
| 4 | roles: |
| 5 | - kubectl |
| 6 | - helm |
| 7 | |
| 8 | - name: Deploy rancher server and create k8s env |
| 9 | hosts: infrastructure |
| 10 | roles: |
| 11 | - rancher |
| 12 | vars: |
| 13 | rancher_role: server |
| 14 | |
| 15 | - name: Deploy rancher agents |
| 16 | hosts: kubernetes |
| 17 | roles: |
| 18 | - rancher |
| 19 | vars: |
| 20 | rancher_role: agent |
| 21 | |
| 22 | - name: Wait for Kubernetes environment to be healthy |
| 23 | hosts: infrastructure |
| 24 | tasks: |
| 25 | - name: Check cluster health |
| 26 | uri: |
| 27 | url: "{{ rancher_server_url }}/v2-beta/projects/{{ k8s_env_id }}" |
| 28 | register: env_info |
| 29 | retries: 30 |
| 30 | delay: 15 |
| 31 | until: "env_info.json.healthState == 'healthy'" |