chore: consolidation

master
Sven Ketelsen 4 years ago
parent 46e021d22c
commit d47edf672c

@ -7,7 +7,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -35,10 +35,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -58,7 +58,7 @@
# Creating database backups for created inventory # Creating database backups 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -88,7 +88,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -14,7 +14,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -41,10 +41,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -74,7 +74,7 @@
# Creating databases for created inventory # Creating databases 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -120,7 +120,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -7,7 +7,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -34,10 +34,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -54,7 +54,7 @@
# Creating kibana search objects for created inventory # Creating kibana search objects 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) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: no gather_facts: no
remote_user: root remote_user: root
@ -191,7 +191,7 @@
############################################################# #############################################################
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -5,7 +5,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -35,10 +35,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -55,7 +55,7 @@
# Creating realms for created inventory # Creating realms 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) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
@ -81,7 +81,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

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

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -29,10 +29,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -49,7 +49,7 @@
# Creating services for created inventory # Creating services 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -70,7 +70,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -1,6 +1,44 @@
--- ---
- hosts: hcloud_fw
# updates firewall config
# Parameters:
# playbook inventory
# stage := the name of the stage (e.g. dev, int, qa, prod)
#############################################################
# Creating inventory dynamically for given parameters
#############################################################
- hosts: localhost
gather_facts: false
connection: local connection: local
pre_tasks:
- name: "Check if ansible version is at least 2.10.x"
assert:
that:
- ansible_version.major >= 2
- ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})"
# 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 }}-virtual-host-to-read-groups-vars"
groups:
- "stage_{{ stage }}"
changed_when: False
#############################################################
# Creating inventory dynamically for given parameters
#############################################################
- hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local
tasks: tasks:
- name: "Setup hcloud firewall via include_role" - name: "Setup hcloud firewall via include_role"
include_role: include_role:

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -31,10 +31,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -54,7 +54,7 @@
# Importing database backups for created inventory # Importing database backups 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -82,7 +82,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -6,7 +6,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -33,10 +33,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -66,7 +66,7 @@
# Deleting databases for created inventory # Deleting databases 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -100,7 +100,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -5,7 +5,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -35,10 +35,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -55,7 +55,7 @@
# Deleting client for created inventory # Deleting client 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) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
@ -80,7 +80,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -33,10 +33,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -82,7 +82,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)
@ -29,10 +29,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -78,7 +78,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -7,7 +7,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_service := (service to setup, e.g. 'connect', ...) # cluster_service := (service to setup, e.g. 'connect', ...)
@ -34,10 +34,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -57,7 +57,7 @@
# Restoring databases for created inventory # Restoring databases 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -87,7 +87,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -1,6 +1,3 @@
[hcloud_fw]
localhost ansible_connection=local
[awx] [awx]
prodnso-awx-01 prodnso-awx-01
@ -46,7 +43,7 @@ prodnso-postgres-02
[prometheus] [prometheus]
prodnso-prometheus-01 prodnso-prometheus-01
[peripheral_systems:children] [stage_prodnso:children]
awx awx
connect connect
elastic elastic
@ -62,12 +59,8 @@ postfix
postgres postgres
prometheus prometheus
[stage_prodnso:children]
peripheral_systems
hcloud_fw
[all:children] [all:children]
stage_prodnso stage_prodnso
[hcloud:children] [hcloud:children]
peripheral_systems stage_prodnso

@ -4,7 +4,7 @@
# Parameters: # Parameters:
# playbook inventory # 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)
# smardigo message callback # smardigo message callback
# scope_id := (scope id of the management process) # scope_id := (scope id of the management process)
# process_instance_id := (process instance id of the management process) # process_instance_id := (process instance id of the management process)

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...]) # cluster_services := (services to setup, e.g. ['connect', 'wordpress', ...])
@ -28,10 +28,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" 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 # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-smardigo-management-message> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-smardigo-management-message" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -48,7 +48,7 @@
# Stopping services for created inventory # Stopping services 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) }}" serial: "{{ serial_number | default(1) }}"
remote_user: root remote_user: root
vars: vars:
@ -74,7 +74,7 @@
# Sending smardigo management message to process # Sending smardigo management message to process
############################################################# #############################################################
- hosts: "{{ stage }}-smardigo-management-message" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -2,7 +2,7 @@
# Parameters: # Parameters:
# playbook inventory # 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)
# username := the default username to use for the ssh connection # username := the default username to use for the ssh connection
############################################################# #############################################################
@ -21,10 +21,10 @@
- ansible_version.minor >= 10 - ansible_version.minor >= 10
msg: "The ansible version has to be at least ({{ ansible_version.full }})" msg: "The ansible version has to be at least ({{ ansible_version.full }})"
# add fictive server to load stage specific variables # add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-smardigo-host> to hosts" - name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
add_host: add_host:
name: "{{ stage }}-virtual-smardigo-host" name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups: groups:
- "stage_{{ stage }}" - "stage_{{ stage }}"
changed_when: False changed_when: False
@ -33,7 +33,7 @@
# Updating ssh config for servers with given stage # Updating ssh config for servers with given stage
############################################################# #############################################################
- hosts: "{{ stage }}-virtual-smardigo-host" - hosts: "{{ stage }}-virtual-host-to-read-groups-vars"
serial: "{{ serial_number | default(1) }}" serial: "{{ serial_number | default(1) }}"
gather_facts: false gather_facts: false
connection: local connection: local

@ -9,7 +9,7 @@
# Parameters: # Parameters:
# playbook inventory # 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) # tenant_id := (unique key for the tenant, e.g. customer)
# cluster_name := (business name for the cluster, e.g. product, department ) # cluster_name := (business name for the cluster, e.g. product, department )
# cluster_size := (WIP node count for the cluster) # cluster_size := (WIP node count for the cluster)

Loading…
Cancel
Save