mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Allow for creation of multiple T-Pots
This commit is contained in:
@ -4,14 +4,21 @@
|
|||||||
roles:
|
roles:
|
||||||
- check
|
- check
|
||||||
|
|
||||||
- name: Deploy instance
|
- name: Deploy instances
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
vars_files: my_os_cloud.yaml
|
vars_files: my_os_cloud.yaml
|
||||||
roles:
|
tasks:
|
||||||
- create_net
|
- name: Create security group and network
|
||||||
- create_vm
|
ansible.builtin.include_role:
|
||||||
|
name: create_net
|
||||||
|
- name: Create one or more instances
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: create_vm
|
||||||
|
loop: "{{ range(0, 1) }}"
|
||||||
|
loop_control:
|
||||||
|
extended: yes
|
||||||
|
|
||||||
- name: Install T-Pot on new instance
|
- name: Install T-Pot
|
||||||
hosts: tpot
|
hosts: tpot
|
||||||
remote_user: linux
|
remote_user: linux
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
tpot_name: "t-pot-ansible-{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=6') }}"
|
tpot_name: "t-pot-ansible-{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=6') }}"
|
||||||
|
|
||||||
- name: Create instance
|
- name: Create instance {{ ansible_loop.index }} of {{ ansible_loop.length }}
|
||||||
openstack.cloud.server:
|
openstack.cloud.server:
|
||||||
cloud: "{{ cloud }}"
|
cloud: "{{ cloud }}"
|
||||||
name: "{{ tpot_name }}"
|
name: "{{ tpot_name }}"
|
||||||
|
Reference in New Issue
Block a user