skylab
/
skylab-ansible
Archived
2
0
Fork 0

Remove hacky and frankly embarassing role usage pattern

This commit is contained in:
Ethan Paul 2021-11-15 20:54:28 -05:00
parent b4feffc118
commit cf22d27c57
No known key found for this signature in database
GPG Key ID: 6A337337DF6B5B1A
4 changed files with 9 additions and 14 deletions

View File

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

View File

@ -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([])"

View File

@ -7,7 +7,6 @@
private: true
roles:
- role: datastore
when: "'datastore' in skylab_roles | default([])"
tasks:
- name: Fetch node swarm ID
ansible.builtin.command:

View File

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