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:
name:
- gcc
- pwgen
- python3-dev
- python3-setuptools
- python3-pip

View file

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