mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 03:38:51 +00:00
35 lines
970 B
YAML
35 lines
970 B
YAML
![]() |
- name: Create T-Pot name
|
||
|
shell: echo t-pot-otc-$(pwgen -ns 6 -1)
|
||
|
register: tpot_name
|
||
|
|
||
|
- name: Import OpenStack authentication variables
|
||
|
include_vars:
|
||
|
file: roles/deploy/vars/os_auth.yaml
|
||
|
|
||
|
- name: Launch an instance
|
||
|
os_server:
|
||
|
auth:
|
||
|
auth_url: "{{ auth_url }}"
|
||
|
username: "{{ username }}"
|
||
|
password: "{{ password }}"
|
||
|
project_name: "{{ project_name }}"
|
||
|
os_user_domain_name: "{{ os_user_domain_name }}"
|
||
|
name: "{{ tpot_name.stdout }}"
|
||
|
region_name: "{{ region_name }}"
|
||
|
availability_zone: "{{ availability_zone }}"
|
||
|
image: "{{ image }}"
|
||
|
boot_from_volume: yes
|
||
|
volume_size: "{{ volume_size }}"
|
||
|
key_name: "{{ key_name }}"
|
||
|
timeout: 200
|
||
|
flavor: "{{ flavor }}"
|
||
|
security_groups: "{{ security_groups }}"
|
||
|
network: "{{ network }}"
|
||
|
register: tpot
|
||
|
|
||
|
- name: Add instance to inventory
|
||
|
add_host:
|
||
|
hostname: "{{ tpot_name.stdout }}"
|
||
|
ansible_host: "{{ tpot.server.public_v4 }}"
|
||
|
groups: TPOT
|