skylab
/
skylab-ansible
Archived
2
0
Fork 0

Move hostname parameter to separate variable

Update inventory to support hubble
This commit is contained in:
Ethan Paul 2021-11-06 02:03:20 -04:00
parent 742ef24a77
commit 8f805c3b15
No known key found for this signature in database
GPG Key ID: 6A337337DF6B5B1A
2 changed files with 7 additions and 5 deletions

View File

@ -32,18 +32,18 @@ en1:
skylab_targets: [cluster, datastore]
skylab_roles:
- server
- docker-swarm-manager
- docker-swarm
- datastore
hosts:
pegasus: # jupiter
ansible_host: 10.42.101.100
skylab_hostname: pegasus.skylab.enp.one
skylab_description: Arbiter Node
skylab_cluster:
address: 10.42.101.10/24
interface: bond0
skylab_networking:
hostname: pegasus.skylab.enp.one
dns: [10.42.101.1]
gateway: 10.42.101.1/24
interfaces:
@ -64,12 +64,12 @@ en1:
saturn: # remus
ansible_host: 10.42.101.110
skylab_hostname: saturn.skylab.enp.one
skylab_description: Operational Node
skylab_cluster:
address: 10.42.101.11/24
interface: bond0
skylab_networking:
hostname: saturn.skylab.enp.one
dns: [10.42.101.1]
gateway: 10.42.101.1/24
interfaces:
@ -90,12 +90,12 @@ en1:
orion: # romulus
ansible_host: 10.42.101.120
skylab_hostname: orion.skylab.enp.one
skylab_description: Operational Node
skylab_cluster:
address: 10.42.101.12/24
interface: bond0
skylab_networking:
hostname: orion.skylab.enp.one
dns: [10.42.101.1]
gateway: 10.42.101.1/24
interfaces:
@ -121,5 +121,7 @@ en2:
hosts:
hubble:
ansible_host: en2a.enp.one
skylab_hostname: hubble.en2.enp.one
skylab_description: Cloud Web Server
skylab_targets: [cloud]
skylab_roles: [server]

View File

@ -23,7 +23,7 @@
- name: Set hostname
become: true
ansible.builtin.hostname:
name: "{{ skylab_networking.hostname | default(inventory_hostname) }}"
name: "{{ skylab_hostname | default(inventory_hostname) }}"
use: systemd
- name: Disable case-sensitive tab-completion