mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-29 03:38:51 +00:00
25 lines
689 B
YAML
25 lines
689 B
YAML
![]() |
- name: Generate T-Pot name
|
||
|
set_fact:
|
||
|
tpot_name: "t-pot-ansible-{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=6') }}"
|
||
|
|
||
|
- name: Create instance
|
||
|
os_server:
|
||
|
cloud: open-telekom-cloud
|
||
|
name: "{{ tpot_name.stdout }}"
|
||
|
availability_zone: "{{ availability_zone }}"
|
||
|
image: "{{ image }}"
|
||
|
boot_from_volume: yes
|
||
|
volume_size: "{{ volume_size }}"
|
||
|
key_name: "{{ key_name }}"
|
||
|
timeout: 200
|
||
|
flavor: "{{ flavor }}"
|
||
|
security_groups: sg-tpot-any
|
||
|
network: network-tpot
|
||
|
register: tpot
|
||
|
|
||
|
- name: Add instance to inventory
|
||
|
add_host:
|
||
|
hostname: "{{ tpot_name.stdout }}"
|
||
|
ansible_host: "{{ tpot.server.public_v4 }}"
|
||
|
groups: tpot
|