|
|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
# Parameters:
|
|
|
|
|
# playbook inventory
|
|
|
|
|
# stage := the type of the stage (e.g. dev, int, qa, prod)
|
|
|
|
|
# stage := the name of the stage (e.g. dev, int, qa, prod)
|
|
|
|
|
# tenant_id := (unique key for the tenant, e.g. customer)
|
|
|
|
|
# cluster_name := (business name for the cluster, e.g. product, department )
|
|
|
|
|
# cluster_size := (WIP node count for the cluster)
|
|
|
|
|
@ -28,10 +28,10 @@
|
|
|
|
|
- ansible_version.minor >= 10
|
|
|
|
|
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
|
|
|
|
|
|
|
|
|
|
# add fictive server to load stage specific variables as context for sending smardigo management messages
|
|
|
|
|
- name: "Add <{{ stage }}-smardigo-management-message> to hosts"
|
|
|
|
|
# add virtual server to load stage specific variables as context
|
|
|
|
|
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
|
|
|
|
|
add_host:
|
|
|
|
|
name: "{{ stage }}-smardigo-management-message"
|
|
|
|
|
name: "{{ stage }}-virtual-host-to-read-groups-vars"
|
|
|
|
|
groups:
|
|
|
|
|
- "stage_{{ stage }}"
|
|
|
|
|
changed_when: False
|
|
|
|
|
@ -50,7 +50,7 @@
|
|
|
|
|
# Creating servers for created inventory
|
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
|
|
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
|
|
|
|
|
- hosts: "stage_{{ stage }}:!{{ stage }}-virtual-host-to-read-groups-vars"
|
|
|
|
|
serial: "{{ serial_number | default(5) }}"
|
|
|
|
|
gather_facts: false
|
|
|
|
|
|
|
|
|
|
@ -94,7 +94,7 @@
|
|
|
|
|
# Provisioning servers for created inventory
|
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
|
|
- hosts: "stage_{{ stage }}:!{{ stage }}-smardigo-management-message"
|
|
|
|
|
- hosts: "stage_{{ stage }}:!{{ stage }}-virtual-host-to-read-groups-vars"
|
|
|
|
|
serial: "{{ serial_number | default(1) }}"
|
|
|
|
|
remote_user: root
|
|
|
|
|
vars:
|
|
|
|
|
@ -140,7 +140,7 @@
|
|
|
|
|
# Sending smardigo management message to process
|
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
|
|
- hosts: "{{ stage }}-smardigo-management-message"
|
|
|
|
|
- hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
|
|
|
|
|
serial: "{{ serial_number | default(1) }}"
|
|
|
|
|
gather_facts: false
|
|
|
|
|
connection: local
|
|
|
|
|
|