DEV-1028 extracted constraint checks into own task

- ansible version
- hetzner ansible roles
qa
Sven Ketelsen 3 years ago
parent f8b5e47b0e
commit 6a31893ac8

@ -19,6 +19,7 @@
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always

@ -28,11 +28,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -34,11 +34,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -27,11 +27,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -28,11 +28,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -26,11 +26,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
@ -48,6 +47,7 @@
- "stage_{{ stage }}"
- '{{ database_engine }}'
changed_when: False
- name: "Add 'storage' servers to hosts if necessary"
add_host:
name: "{{ stage }}-backup-01"

@ -21,11 +21,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -22,11 +22,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -19,12 +19,10 @@
gather_facts: false
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 }})"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# Add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -17,13 +17,10 @@
default: 'no'
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
delegate_to: 127.0.0.1
become: false
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml

@ -24,11 +24,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"
@ -60,7 +59,7 @@
ansible_ssh_host: "{{ stage_server_domain }}"
pre_tasks:
- name: "export autodiscover pre-tasks"
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:

@ -15,11 +15,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -24,11 +24,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -1,39 +0,0 @@
---
- name: 'apply setup to {{ host | default("all") }}'
hosts: '{{ host | default("all") }}'
serial: "{{ serial_number|default(25) }}"
become: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always
- name: "Variable <ansible_distribution>"
debug:
msg: "{{ ansible_distribution }}"
delegate_to: 127.0.0.1
- name: "Variable <group_names>"
debug:
msg: "{{ group_names }}"
delegate_to: 127.0.0.1
- name: "Printing ip addresses for {{ inventory_hostname }}"
debug:
msg: "{{ stage_server_ip }} / {{ stage_private_server_ip }}"
delegate_to: 127.0.0.1
- name: "Printing stage_server_infos"
debug:
msg: "{{ stage_server_infos }}"
delegate_to: 127.0.0.1

@ -9,11 +9,8 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
@ -39,6 +36,7 @@
pre_tasks:
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always

@ -1 +1 @@
Subproject commit 00550ba832aa5d4f59bce03ead09d9e940e3a672
Subproject commit 08467ad6b3bdd5b15c33e3a63d476630766bd04a

@ -19,6 +19,7 @@
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always

@ -24,11 +24,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -24,11 +24,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -27,11 +27,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -35,11 +35,10 @@
when:
- data is defined
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -22,11 +22,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -1,50 +1,14 @@
---
- name: 'apply setup to {{ host | default("all") }}'
hosts: '{{ host | default("all") }}'
- name: "apply setup to {{ host | default('all') }}"
hosts: "{{ host | default('all') }}"
serial: "{{ serial_number | default(5) }}"
vars:
hetzner_ansible_dns_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-dns\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
hetzner_ansible_hcloud_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-hcloud\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
gather_facts: no
become: no
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
tags:
- always
- name: "get hetzner-ansible-dns version"
include_role:
name: hetzner-ansible-dns
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-dns version matches"
assert:
that:
- "'{{ hetzner_ansible_dns_version }}' in {{ hetzner_ansible_dns_current_version }}"
msg: "The current hetzner-ansible-dns version has to be {{ hetzner_ansible_dns_current_version }}"
tags:
- always
- name: "get hetzner-ansible-hcloud version"
include_role:
name: hetzner-ansible-hcloud
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-hcloud version matches"
assert:
that:
- "'{{ hetzner_ansible_hcloud_version }}' in {{ hetzner_ansible_hcloud_current_version }}"
msg: "The current hetzner-ansible-dns version has to be {{ hetzner_ansible_hcloud_current_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
@ -52,8 +16,8 @@
uri:
url: "https://api.hetzner.cloud/v1/firewalls"
headers:
accept: application/json
authorization: Bearer {{ hetzner_authentication_ansible }}
accept: "application/json"
authorization: "Bearer {{ hetzner_authentication_ansible }}"
return_content: yes
register: hetzner_firewalls_response
delegate_to: 127.0.0.1

@ -26,11 +26,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -28,11 +28,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -26,11 +26,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -22,11 +22,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -27,11 +27,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -26,11 +26,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -8,11 +8,8 @@
become: yes
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always

@ -6,96 +6,18 @@
strategy: free
vars:
ansible_ssh_host: "{{ stage_server_domain }}"
hetzner_ansible_common_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-common\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
hetzner_ansible_node_exporter_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-node-exporter\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
hetzner_ansible_filebeat_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-filebeat\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
hetzner_ansible_metricbeat_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-metricbeat\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
hetzner_ansible_traefik_current_version: "{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+hetzner-ansible-traefik\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"
remote_user: root
become: yes
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
- name: "get hetzner-ansible-common version"
include_role:
name: hetzner-ansible-common
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-common version matches"
assert:
that:
- "'{{ hetzner_ansible_common_version }}' in {{ hetzner_ansible_common_current_version }}"
msg: "The current hetzner-ansible-common version has to be {{ hetzner_ansible_common_current_version }}"
tags:
- always
- name: "get hetzner-ansible-node-exporter version"
include_role:
name: hetzner-ansible-node-exporter
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-node-exporter version matches"
assert:
that:
- "'{{ hetzner_ansible_node_exporter_version }}' in {{ hetzner_ansible_node_exporter_current_version }}"
msg: "The current hetzner-ansible-node_exporter version has to be {{ hetzner_ansible_node_exporter_current_version }}"
tags:
- always
- name: "get hetzner-ansible-filebeat version"
include_role:
name: hetzner-ansible-filebeat
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-filebeat version matches"
assert:
that:
- "'{{ hetzner_ansible_filebeat_version }}' in {{ hetzner_ansible_filebeat_current_version }}"
msg: "The current hetzner-ansible-filebeat version has to be {{ hetzner_ansible_filebeat_current_version }}"
tags:
- always
- name: "get hetzner-ansible-metricbeat version"
include_role:
name: hetzner-ansible-metricbeat
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-metricbeat version matches"
assert:
that:
- "'{{ hetzner_ansible_metricbeat_version }}' in {{ hetzner_ansible_metricbeat_current_version }}"
msg: "The current hetzner-ansible-metricbeat version has to be {{ hetzner_ansible_metricbeat_current_version }}"
tags:
- always
- name: "get hetzner-ansible-traefik version"
include_role:
name: hetzner-ansible-traefik
tasks_from: _get_version.yml
tags:
- always
- name: "Check if hetzner-ansible-traefik version matches"
assert:
that:
- "'{{ hetzner_ansible_traefik_version }}' in {{ hetzner_ansible_traefik_current_version }}"
msg: "The current hetzner-ansible-traefik version has to be {{ hetzner_ansible_traefik_current_version }}"
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always
@ -118,12 +40,6 @@
- common
- install
- name: "Import autodiscover pre-tasks"
import_tasks: tasks/autodiscover_pre_tasks.yml
become: false
tags:
- always
roles:
- role: ansible-role-docker
when:

@ -8,11 +8,8 @@
become: yes
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always

@ -0,0 +1,54 @@
---
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
tags:
- always
- name: "Reading all role versions and set versions as facts"
set_fact:
hetzner_ansible_roles:
- "hetzner-ansible-common"
- "hetzner-ansible-dns"
- "hetzner-ansible-filebeat"
- "hetzner-ansible-hcloud"
- "hetzner-ansible-metricbeat"
- "hetzner-ansible-node-exporter"
- "hetzner-ansible-traefik"
- "hetzner-ansible-sma-deploy"
tags:
- always
- name: "Reading all role versions and set versions as facts (galaxy-requirements) "
set_fact:
{"{{ item | replace('-','_') }}_current_version":"{{ lookup('file', 'galaxy-requirements.yml') | regex_search('- name:\\s+' + item + '\\s+src:\\s+.*?\\s+scm:\\s+git\\s+version:\\s+(.*)', '\\1') }}"}
loop: "{{ hetzner_ansible_roles }}"
tags:
- always
- name: "Reading all role versions and set versions as facts (role)"
include_role:
name: "{{ item }}"
tasks_from: _get_version.yml
loop: "{{ hetzner_ansible_roles }}"
tags:
- always
- name: "Printing role versions"
debug:
msg: "<{{ item }}> : <{{ lookup('vars', item | replace('-','_') + '_current_version') }}> : <{{ lookup('vars', item | replace('-','_') + '_version') }}>"
loop: "{{ hetzner_ansible_roles }}"
tags:
- always
- name: "Check role versions"
assert:
that:
- "'{{ lookup('vars', item | replace('-','_') + '_version') }}' in {{ lookup('vars', item | replace('-','_') + '_current_version') }}"
msg: "The current {{ item }} version has to be {{ lookup('vars', item | replace('-','_') + '_current_version') }}"
loop: "{{ hetzner_ansible_roles }}"
tags:
- always

@ -23,11 +23,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -19,11 +19,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -21,11 +21,10 @@
connection: local
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -14,11 +14,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
# add virtual server to load stage specific variables as context
- name: "Add <{{ stage }}-virtual-host-to-read-groups-vars> to hosts"

@ -23,11 +23,10 @@
gather_facts: false
pre_tasks:
- name: "Check if ansible version is at least {{ ansible_minimal_version }}"
assert:
that:
- ansible_version.string is version(ansible_minimal_version, ">=")
msg: "The ansible version has to be at least {{ ansible_minimal_version }}"
- name: "Import constraints check"
import_tasks: tasks/constraints_check.yml
tags:
- always
tasks:
- name: "Add maria servers to hosts if necessary"

Loading…
Cancel
Save