Remove hacky and frankly embarassing role usage pattern
This commit is contained in:
parent
b4feffc118
commit
cf22d27c57
@ -24,8 +24,6 @@ en1:
|
||||
ansible_host: 10.42.101.200
|
||||
skylab_description: Local Monitor Node
|
||||
skylab_targets: [network]
|
||||
skylab_roles:
|
||||
- server
|
||||
|
||||
children:
|
||||
|
||||
@ -33,10 +31,6 @@ en1:
|
||||
vars:
|
||||
skylab_targets: [cluster, datastore]
|
||||
skylab_compose_version: 3.8
|
||||
skylab_roles:
|
||||
- server
|
||||
- datastore
|
||||
- swarm
|
||||
|
||||
hosts:
|
||||
pegasus: # jupiter
|
||||
@ -158,4 +152,3 @@ en2:
|
||||
skylab_hostname: hubble.en2.enp.one
|
||||
skylab_description: Cloud Web Server
|
||||
skylab_targets: [cloud]
|
||||
skylab_roles: [server]
|
||||
|
@ -16,13 +16,17 @@
|
||||
- include_tasks: tasks/meta/bootstrap-remote-env.yaml
|
||||
|
||||
|
||||
- name: Configure hosts by role
|
||||
hosts: linux
|
||||
# "server", here, is a word used to mean "not a workstation"
|
||||
- name: Configure servers
|
||||
hosts: linux:!workstation
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: server
|
||||
when: "'server' in skylab_roles | default([])"
|
||||
|
||||
|
||||
- name: Configure cluster
|
||||
hosts: linux:&cluster
|
||||
gather_facts: false
|
||||
roles:
|
||||
- role: datastore
|
||||
when: "'datastore' in skylab_roles | default([])"
|
||||
- role: swarm
|
||||
when: "'swarm' in skylab_roles | default([])"
|
||||
|
@ -7,7 +7,6 @@
|
||||
private: true
|
||||
roles:
|
||||
- role: datastore
|
||||
when: "'datastore' in skylab_roles | default([])"
|
||||
tasks:
|
||||
- name: Fetch node swarm ID
|
||||
ansible.builtin.command:
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
- name: Determine gluster servers
|
||||
run_once: true
|
||||
when: "'datastore' in hostvars[item].skylab_roles | default([])"
|
||||
vars:
|
||||
_docker_glusterfs_hostnames: []
|
||||
ansible.builtin.set_fact:
|
||||
|
Reference in New Issue
Block a user