bugfix: playbook update-ssh-config-file was broken

- digital ocean token was read from group all/vault
- playbook reads stage specific configuration
master
Sven Ketelsen 4 years ago
parent 6852b06572
commit 073ef1331d

@ -1,3 +1,4 @@
[defaults]
inventory_plugins = ./inventory_plugins
callbacks_enabled = timer
interpreter_python = auto_silent

@ -6,7 +6,7 @@
# username := the default username to use for the ssh connection
#############################################################
# Updating ssh config for servers with given stage
# Creating inventory dynamically for given parameters
#############################################################
- hosts: localhost
@ -21,6 +21,24 @@
- 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_host:
name: "{{ stage }}-virtual-smardigo-host"
groups:
- "stage_{{ stage }}"
changed_when: False
#############################################################
# Updating ssh config for servers with given stage
#############################################################
- hosts: "{{ stage }}-virtual-smardigo-host"
serial: "{{ serial_number | default(1) }}"
gather_facts: false
connection: local
pre_tasks:
- name: "Reading current server groups from hetzner"
include_role:
name: hcloud

Loading…
Cancel
Save