Improve Ansible resource naming

This commit is contained in:
Sebastian Haderecker 2021-04-15 16:58:19 +02:00
parent 628ea0224c
commit 0649d56521
2 changed files with 10 additions and 10 deletions
cloud/ansible/openstack/roles
create_net/tasks
create_vm/tasks

View file

@ -1,25 +1,25 @@
- name: Create security group
openstack.cloud.security_group:
cloud: "{{ cloud }}"
name: sg-tpot-any
description: tpot any-any
name: sg-tpot-ansible
description: Security Group for T-Pot
- name: Add rules to security group
openstack.cloud.security_group_rule:
cloud: "{{ cloud }}"
security_group: sg-tpot-any
security_group: sg-tpot-ansible
remote_ip_prefix: 0.0.0.0/0
- name: Create network
openstack.cloud.network:
cloud: "{{ cloud }}"
name: network-tpot
name: network-tpot-ansible
- name: Create subnet
openstack.cloud.subnet:
cloud: "{{ cloud }}"
network_name: network-tpot
name: subnet-tpot
network_name: network-tpot-ansible
name: subnet-tpot-ansible
cidr: 192.168.0.0/24
dns_nameservers:
- 1.1.1.1
@ -28,6 +28,6 @@
- name: Create router
openstack.cloud.router:
cloud: "{{ cloud }}"
name: router-tpot
name: router-tpot-ansible
interfaces:
- subnet-tpot
- subnet-tpot-ansible

View file

@ -13,8 +13,8 @@
key_name: "{{ key_name }}"
timeout: 200
flavor: "{{ flavor }}"
security_groups: sg-tpot-any
network: network-tpot
security_groups: sg-tpot-ansible
network: network-tpot-ansible
register: tpot
- name: Add instance to inventory