Last active
August 1, 2020 00:57
-
-
Save cloudqubes/7bd71a741750f18d2d27db0a95407694 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2014-10-16 | |
description: ANSIBLE | |
parameters: | |
# Image definitions | |
image: | |
type: string | |
default: "bionic-server-cloudimg-amd64" | |
# Vapp Name | |
stack_name: | |
type: string | |
default: "ansible" | |
# NETWORK definitions | |
oam_net: | |
type: string | |
default: "oam_net" | |
ansible_service_net: | |
type: string | |
default: "service_net" | |
#VM_01 Port Details | |
oam_ip: | |
type: string | |
default: "10.10.10.2" | |
ansible_service_ip: | |
type: string | |
default: "10.10.11.2" | |
resources: | |
#flavor | |
flavor: | |
type: OS::Nova::Flavor | |
properties: | |
name: | |
list_join: ['_', [{get_param: stack_name}, '01']] | |
vcpus: 4 | |
ram: 8192 | |
disk: 20 | |
extra_specs: { "hw:cpu_policy" : "dedicated", "hw:mem_page_size": "1048576" } | |
#vNIC Port Configuration | |
oam_port: | |
type: OS::Neutron::Port | |
properties: | |
name: | |
list_join: ['_', [{get_param: stack_name}, 'oam']] | |
network: { get_param: oam_net } | |
fixed_ips: | |
- ip_address: { get_param: oam_ip } | |
port_security_enabled: false | |
ansible_service_port: | |
type: OS::Neutron::Port | |
properties: | |
name: | |
list_join: ['_', [{get_param: stack_name}, 'service']] | |
network: { get_param: ansible_service_net } | |
fixed_ips: | |
- ip_address: { get_param: ansible_service_ip } | |
port_security_enabled: false | |
#Cinder volume | |
ansible_volume: | |
type: OS::Cinder::Volume | |
properties: | |
name: | |
list_join: ['_', [{get_param: stack_name}, 'vda']] | |
image: { get_param: image } | |
size: 10 | |
deletion_policy: Retain | |
#VM | |
ansible_server: | |
type: OS::Nova::Server | |
properties: | |
config_drive: "true" | |
name: { get_param: stack_name } | |
flavor: { get_resource: flavor } | |
availability_zone: "zone-A" | |
block_device_mapping_v2: | |
- device_name: vda | |
boot_index: 0 | |
delete_on_termination: False | |
volume_id : { get_resource : ansible_volume } | |
networks: | |
- port: { get_resource: oam_port } | |
- port: { get_resource: ansible_service_port } | |
user_data_format: RAW | |
user_data: | | |
#cloud-config | |
password: ansibleServer | |
chpasswd: { expire: False } | |
ssh_pwauth: True | |
user_data_update_policy: IGNORE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment