Skip to content
Snippets Groups Projects
Commit eb18e9bb authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch 'remove_cluster_inventory_group' into 'master'

Remove traces of ansible group "cluster"

Closes #141

See merge request openappstack/bootstrap!81
parents 31d7d12b afe5a487
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ bootstrap:
paths:
- ansible/rke.log
- test/inventory.yml
- test/group_vars/cluster/settings.yml
- test/group_vars/all/settings.yml
expire_in: 1 month
when: always
......
......@@ -18,7 +18,7 @@
"Release name ({{ release_name }}) should start with lower case."
- name: Configure all hosts
hosts: cluster
hosts: all
# We use `mitogen_linear` as default strategy. However,
# mitogen fails installing the `openshift` python module as requirement
# for the `k8s` ansible resource, and using `k8s` in the same context.
......@@ -30,7 +30,7 @@
tags: ['configure']
- name: Prepare nodes
hosts: cluster
hosts: all
roles:
- role: prepare_node
tags: ['prepare_node']
......
File moved
......@@ -6,9 +6,6 @@ all:
# Ssh user to log in as.
ansible_user: "root"
children:
cluster:
hosts:
oas-dev
master:
hosts:
oas-dev
......
nodes:
{% for node in groups['cluster'] %}
{% for node in groups['all'] %}
- address: {{ hostvars[node]['ansible_host'] }}
# port: "22"
# internal_address: ""
......
......@@ -41,7 +41,7 @@ import yaml
import cosmos
SETTINGS_FILE = './group_vars/cluster/settings.yml'
SETTINGS_FILE = './group_vars/all/settings.yml'
ANSIBLE_INVENTORY = './inventory.yml'
......@@ -166,7 +166,6 @@ def main(): # pylint: disable=too-many-statements,too-many-branches
inventory['all']['hosts'][droplet_name]['ansible_host'] = droplet_ip
inventory['all']['hosts'][droplet_name]['ansible_ssh_extra_args'] = \
'-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
inventory['all']['children']['cluster']['hosts'] = droplet_name
inventory['all']['children']['master']['hosts'] = droplet_name
inventory['all']['children']['worker']['hosts'] = droplet_name
......@@ -174,7 +173,7 @@ def main(): # pylint: disable=too-many-statements,too-many-branches
yaml.safe_dump(inventory, stream, default_flow_style=False)
# Create settings
with open('../ansible/group_vars/cluster/settings.yml.example',
with open('../ansible/group_vars/all/settings.yml.example',
'r') as stream:
settings = yaml.safe_load(stream)
......
../../ansible/group_vars/all
\ No newline at end of file
../../ansible/group_vars/all.yml
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment