-
Notifications
You must be signed in to change notification settings - Fork 1
/
CLC_Create-Zenoss523-Servers-In-Control-playbook.yml
46 lines (39 loc) · 1.87 KB
/
CLC_Create-Zenoss523-Servers-In-Control-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
################################################################################
# description: Ensure a specific server group exists in Control in CenturyLink Cloud
# usage: ansible-playbook CLC_Create-Zenoss523-Servers-In-Control-playbook.yml
# example: ansible-playbook CLC_Create-Zenoss523-Servers-In-Control-playbook.yml --extra-vars 'DC=VA1 Password=P@$$W0rd! Name=ztkx Description=Zenoss Count=1 Memory=24 Group=Zenoss'
# author: Ernest G. Wilson II <[email protected]> (https://github.com/ernestgwilsonii)
# license: MIT
################################################################################
# Ansible Playbook options
# REF: http://docs.ansible.com/ansible/playbooks.html
#####################################################
- name: Ensure servers exist in Control
hosts: localhost
gather_facts: False
connection: local
tasks:
# clc_server - Create, Delete, Start and Stop servers in CenturyLink Cloud
# REF: http://docs.ansible.com/ansible/clc_server_module.html
#############################################################
- name: Create servers
ignore_errors: yes
clc_server:
location: "{{ DC|default ('VA1') }}"
password: "{{ Password|default ('P@$$W0rd!') }}"
name: "{{ Name|default ('ZDTSX') }}"
description: "{{ Description|default ('Zenoss') }}"
template: "{{ Template|default ('CENTOS-7-64-TEMPLATE') }}"
count: "{{ Count|default ('1') }}"
group: "{{ Group|default ('Default Group') }}"
cpu: "{{ CPU|default ('4') }}"
memory: "{{ Memory|default ('24') }}"
additional_disks:
- {sizeGB: 50, type: raw}
- {sizeGB: 200, type: raw}
- {sizeGB: 51, type: raw}
- {sizeGB: 151, type: raw}
primary_dns: "{{ DNS1|default ('172.17.1.26') }}"
secondary_dns: "{{ DNS2|default ('172.17.1.27') }}"
wait: True