chore: consolidation

master
Sven Ketelsen 4 years ago
parent 46e021d22c
commit d47edf672c

@ -7,7 +7,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)
@ -35,10 +35,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
@ -58,7 +58,7 @@
# 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) }}"
remote_user: root
vars:
@ -88,7 +88,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

@ -14,7 +14,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)
@ -41,10 +41,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
@ -74,7 +74,7 @@
# 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) }}"
remote_user: root
vars:
@ -120,7 +120,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

@ -7,7 +7,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)
@ -34,10 +34,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
@ -54,7 +54,7 @@
# 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) }}"
gather_facts: no
remote_user: root
@ -191,7 +191,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

@ -5,7 +5,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)
@ -35,10 +35,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
@ -55,7 +55,7 @@
# 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) }}"
gather_facts: false
@ -81,7 +81,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

@ -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

@ -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)
@ -29,10 +29,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
@ -49,7 +49,7 @@
# 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) }}"
remote_user: root
vars:
@ -70,7 +70,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

@ -1,11 +1,49 @@
---
- 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
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:
- name: "Setup hcloud firewall via include_role"
- name: "Setup hcloud firewall via include_role"
include_role:
name: hcloud
tasks_from: configure-firewall2
tasks_from: configure-firewall2
loop: "{{ hcloud_firewall_objects }}"
loop_control:
loop_var: firewall_object

@ -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)
@ -31,10 +31,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
@ -54,7 +54,7 @@
# 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) }}"
remote_user: root
vars:
@ -82,7 +82,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

@ -6,7 +6,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)
@ -33,10 +33,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
@ -66,7 +66,7 @@
# 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) }}"
remote_user: root
vars:
@ -100,7 +100,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

@ -5,7 +5,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)
@ -35,10 +35,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
@ -55,7 +55,7 @@
# 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) }}"
gather_facts: false
@ -80,7 +80,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

@ -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)
@ -33,10 +33,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
@ -82,7 +82,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

@ -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)
@ -29,10 +29,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
@ -78,7 +78,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

@ -7,7 +7,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_service := (service to setup, e.g. 'connect', ...)
@ -34,10 +34,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
@ -57,7 +57,7 @@
# 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) }}"
remote_user: root
vars:
@ -87,7 +87,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

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

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

@ -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_services := (services to setup, e.g. ['connect', 'wordpress', ...])
@ -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
@ -48,7 +48,7 @@
# 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) }}"
remote_user: root
vars:
@ -74,7 +74,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

@ -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)
# username := the default username to use for the ssh connection
#############################################################
@ -21,10 +21,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
- name: "Add <{{ stage }}-virtual-smardigo-host> 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 }}-virtual-smardigo-host"
name: "{{ stage }}-virtual-host-to-read-groups-vars"
groups:
- "stage_{{ stage }}"
changed_when: False
@ -33,7 +33,7 @@
# 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) }}"
gather_facts: false
connection: local

@ -9,7 +9,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)

Loading…
Cancel
Save