-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
executable file
·43 lines (36 loc) · 1.06 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env ansible-playbook
---
- name: Configure Ansible Controller
hosts: localhost
connection: local
tags: [configure]
collections:
- awx.awx
- infra.controller_configuration
pre_tasks:
- name: Configure git
ansible.builtin.command: "git config --global core.sshCommand 'ssh -o StrictHostKeyChecking=accept-new'"
changed_when: false
args:
warn: false
- name: Include vars from configs directory
ansible.builtin.include_vars:
dir: inventory/group_vars/controller
extensions: ["yml"]
no_log: true
tags:
- always
- name: Wait for API
ansible.builtin.uri:
url: "https://{{ controller_hostname }}/api/v2/ping"
status_code: 200
validate_certs: "{{ controller_validate_certs }}"
register: result
until: result.status == 200
retries: 20
delay: 3
ignore_errors: true
- name: Update token
ansible.builtin.include_tasks: tasks/get_token.yml
roles:
- dispatch # The dispatch role calls all of the other roles.