Repository navigation
Expand file tree
/
Copy pathsetup_demo.yml
More file actions
66 lines (57 loc) · 2.5 KB
/
Copy pathsetup_demo.yml
File metadata and controls
66 lines (57 loc) · 2.5 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
- name: Setup common prerequisites
hosts: localhost
gather_facts: false
# vars_files should be scoped to a play so variables defined in the
# files should not be available in subsequent plays, so certain
# resources won't be retried
vars_files:
- common/setup.yml
tasks:
- name: Create reusable deployment ID
ansible.builtin.set_fact:
_deployment_id: '{{ lookup("ansible.builtin.password", "{{ playbook_dir }}/.deployment_id", chars=["ascii_lowercase", "digits"], length=5) }}'
# aws_* leaves must exist before os_linux / os_windows parents reference
# them. dispatch -> controller_host_groups fires the full list async with
# loop_delay 0, so a single pass races on a fresh controller (#365).
# Pass an explicit list (do not filter controller_groups): selectattr
# re-templates the whole list and blows up on !unsafe Jinja in other groups.
- name: Create AWS leaf inventory groups before parent groups
ansible.builtin.include_role:
name: infra.aap_configuration.controller_host_groups
vars:
controller_dependency_check: false # noqa: var-naming[no-role-prefix]
controller_groups:
- name: aws_rhel
inventory: Ansible Product Demos Inventory
- name: aws_linux
inventory: Ansible Product Demos Inventory
- name: aws_windows
inventory: Ansible Product Demos Inventory
- name: Create common demo resources
ansible.builtin.include_role:
name: infra.aap_configuration.dispatch
vars:
controller_dependency_check: false # noqa: var-naming[no-role-prefix]
- name: Setup demo
hosts: localhost
gather_facts: false
tasks:
- name: Include configuration for {{ demo }}
ansible.builtin.include_vars: "{{ demo }}/setup.yml"
- name: Demo Components
ansible.builtin.include_role:
name: infra.aap_configuration.dispatch
vars:
controller_dependency_check: false # noqa: var-naming[no-role-prefix]
- name: Log Demo
ansible.builtin.uri:
url: https://docs.google.com/forms/d/e/1FAIpQLSdIZ77YpETjEfGOoYlXtMnQiU-6M7QFlb2hJA4ujo25QYb2jw/formResponse
method: POST
body: "ifq&entry.1569353616={{ demo }} &entry.498055740={{ lookup('ansible.builtin.env', 'AWX_HOST') }}&sumbit=Submit"
ignore_errors: true # noqa: ignore-errors - connectivity should not fail play
- name: Print Message
ansible.builtin.debug:
msg: "{{ user_message }}"
when: user_message is defined
...