Use ansible internal tools to generate random name

This commit is contained in:
Sebastian Haderecker 2021-02-13 15:36:39 +01:00
parent c3ebf8487b
commit 487c091ba7
2 changed files with 3 additions and 4 deletions

View file

@ -2,7 +2,6 @@
package: package:
name: name:
- gcc - gcc
- pwgen
- python3-dev - python3-dev
- python3-setuptools - python3-setuptools
- python3-pip - python3-pip

View file

@ -1,6 +1,6 @@
- name: Create T-Pot name - name: Generate T-Pot name
shell: echo t-pot-ansible-$(pwgen -ns 6 -1) set_fact:
register: tpot_name tpot_name: "t-pot-ansible-{{ lookup('password', '/dev/null chars=ascii_lowercase,digits length=6') }}"
- name: Create security group - name: Create security group
os_security_group: os_security_group: