diff options
author | Tomas Alexy <tomas.alexy@pantheon.tech> | 2021-04-08 15:50:24 +0200 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-04-12 05:49:55 +0000 |
commit | 647a693a245ae450756fb3bd9446db856e712812 (patch) | |
tree | 128aa75cf1d9f69c03fbe198071465aa15636b16 /fdio.infra.ansible/roles | |
parent | ae5cd8ce30c435a83868ff7e13d88d41594c227c (diff) |
Infra: AWS bootstrap integration
Signed-off-by: Tomas Alexy <tomas.alexy@pantheon.tech>
Change-Id: I254c79201a198ee054851c934167a24e9e8803cb
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r-- | fdio.infra.ansible/roles/topology/tasks/main.yaml | 18 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/topology/templates/hosts.j2 | 9 |
2 files changed, 25 insertions, 2 deletions
diff --git a/fdio.infra.ansible/roles/topology/tasks/main.yaml b/fdio.infra.ansible/roles/topology/tasks/main.yaml index cf3eb5367f..a70107478e 100644 --- a/fdio.infra.ansible/roles/topology/tasks/main.yaml +++ b/fdio.infra.ansible/roles/topology/tasks/main.yaml @@ -1,9 +1,23 @@ --- # file: roles/topology/tasks/main.yaml -- name: Create topology file +- name: Create Topology File template: src: "templates/topology_{{ cloud_topology }}.j2" - dest: "../../../../topologies/available/{{ cloud_topology }}_{{ testbed_name }}.yaml" + dest: "../topologies/available/{{ cloud_topology }}_{{ testbed_name }}.yaml" tags: - create-topology-file + +- name: Create Inventory Folder + file: + path: "./inventories/cloud_inventory/" + state: directory + tags: + - create-inventory-folder-cloud + +- name: Create Hosts File + template: + src: "templates/hosts.j2" + dest: "./inventories/cloud_inventory/hosts" + tags: + - create-hosts-file-cloud diff --git a/fdio.infra.ansible/roles/topology/templates/hosts.j2 b/fdio.infra.ansible/roles/topology/templates/hosts.j2 new file mode 100644 index 0000000000..12a992dfec --- /dev/null +++ b/fdio.infra.ansible/roles/topology/templates/hosts.j2 @@ -0,0 +1,9 @@ +all: + children: + tg: + hosts: + {{ tg_public_ip }} + sut: + hosts: + {{ dut1_public_ip }} + {{ dut2_public_ip | default() }} |