mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Update folder naming
This commit is contained in:
34
cloud/ansible/openstack/roles/deploy/tasks/main.yaml
Normal file
34
cloud/ansible/openstack/roles/deploy/tasks/main.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
- 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
|
8
cloud/ansible/openstack/roles/deploy/vars/main.yaml
Normal file
8
cloud/ansible/openstack/roles/deploy/vars/main.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
region_name: eu-de
|
||||
availability_zone: eu-de-03
|
||||
image: Standard_Debian_9_latest
|
||||
volume_size: 128
|
||||
key_name: your-KeyPair
|
||||
flavor: s2.medium.8
|
||||
security_groups: your-sg
|
||||
network: your-network-id
|
5
cloud/ansible/openstack/roles/deploy/vars/os_auth.yaml
Normal file
5
cloud/ansible/openstack/roles/deploy/vars/os_auth.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
auth_url: https://iam.eu-de.otc.t-systems.com/v3
|
||||
username: your_api_user
|
||||
password: your_password
|
||||
project_name: eu-de_your_project
|
||||
os_user_domain_name: OTC-EU-DE-000000000010000XXXXX
|
Reference in New Issue
Block a user