Mercurial > code > home > repos > infra
diff inventory.py @ 289:65e28d2e0cd8
move static templates to files/ ; use inventory tags for selecting hosts+features ; other refactors
author | drewp@bigasterisk.com |
---|---|
date | Sun, 21 Apr 2024 17:07:23 -0700 |
parents | e10ee3ddadcf |
children | d000aead76d4 |
line wrap: on
line diff
--- a/inventory.py Sun Apr 21 17:01:13 2024 -0700 +++ b/inventory.py Sun Apr 21 17:07:23 2024 -0700 @@ -1,25 +1,28 @@ big = [ - ('bang', { 'wireguard_address': '10.5.0.1', }), - ('dash', { 'wireguard_address': '10.5.0.5', 'ssh_hostname': 'dash', }), - ('slash', { 'wireguard_address': '10.5.0.6', 'ssh_hostname': 'slash', }), - ('dot', { 'wireguard_address': '10.5.0.30', 'ssh_hostname': 'dot', }), - ('ditto', { 'wireguard_address': '10.5.0.7', }), - # ('squib', { }), + ('bang' , { 'drewp_gid': 1000, 'drewp_uid': 501, 'k8s_admin': True , 'syncthing': True, 'wireguard_address': '10.5.0.1' , }), + ('dash' , { 'drewp_gid': 1000, 'drewp_home': True, 'drewp_uid': 501, 'gpu': True , 'k8s_admin': True , 'ssh_hostname': 'dash', 'syncthing': True, 'wireguard_address': '10.5.0.5', }), + ('slash' , { 'drewp_gid': 1000, 'drewp_home': True, 'drewp_uid': 501, 'k8s_admin': True , 'ssh_hostname': 'slash', 'syncthing': True, 'wireguard_address': '10.5.0.6' , }), + ('dot' , { 'drewp_gid': 1000, 'drewp_uid': 501, 'ssh_hostname': 'dot' , 'syncthing': True, 'wireguard_address': '10.5.0.30', }), + ('ditto' , { 'coral': True, 'drewp_gid': 1000, 'drewp_home': True, 'drewp_uid': 501, 'gpu': True , 'k8s_admin': True, 'syncthing': True, 'wireguard_address': '10.5.0.7', }), + ('squib' , { 'drewp_gid': 1000, 'drewp_uid': 501, }), ] small = [ - ('pipe', { 'wireguard_address': '10.5.0.3', 'ssh_hostname': '10.2.0.3', }), + ('pipe' , { 'drewp_gid': 501 , 'drewp_uid': 1001, 'ssh_hostname': '10.2.0.3' , 'wireguard_address': '10.5.0.3' , }), ] pi = [ - # ('garage', { 'wireguard_address': '10.5.0.14', 'ssh_hostname': 'garage', }), - ('ws-printer', { 'wireguard_address': '10.5.0.31', 'ssh_hostname': 'ws-printer', }), - ('gn-music', { 'wireguard_address': '10.5.0.32', 'ssh_hostname': 'gn-music', }), - ('li-drums', { 'wireguard_address': '10.5.0.33', 'ssh_hostname': 'li-drums', }), + ('garage' , { 'drewp_gid': 501 , 'drewp_uid': 1000, 'ssh_hostname': 'garage' , 'wireguard_address': '10.5.0.14' , }), + ('ws-printer', { 'drewp_gid': 501 , 'drewp_uid': 1000, 'ssh_hostname': 'ws-printer5', 'wireguard_address': '10.5.0.31' , }), + ('li-drums' , { 'drewp_gid': 501 , 'drewp_uid': 1000, 'ssh_hostname': 'li-drums5' , 'wireguard_address': '10.5.0.33' , }), + ('gn-music' , { 'drewp_gid': 501 , 'drewp_uid': 1000, 'ssh_hostname': 'gn-music' , 'wireguard_address': '10.5.0.32' , }), ] -remote = [ - ('prime', { 'wireguard_address': '10.5.0.2', 'ssh_hostname': '162.243.138.136','mac': '04:01:09:7f:89:01',}), - ('plus', { 'wireguard_address': '10.5.0.110','ssh_hostname': '10.2.0.35', }), - ('pillow', { 'wireguard_address': '10.5.0.111','ssh_hostname':'10.5.0.111',}), +hosted = [ + ('prime' , { 'drewp_gid': 1000, 'drewp_uid': 501, 'ssh_hostname': '162.243.138.136', 'wireguard_address': '10.5.0.2' , }), ] + +laptop = [ + ('plus' , { 'drewp_gid': 1000, 'drewp_home': True, 'drewp_uid': 501, 'ssh_hostname': '10.2.0.35' , 'syncthing': True, 'wg_roamer': True, 'wireguard_address': '10.5.0.110', }), + ('pillow' , { 'drewp_gid': 1000, 'drewp_uid': 1000 , 'ssh_hostname': '10.5.0.111' , 'syncthing': True, 'wg_roamer': True, 'wireguard_address': '10.5.0.111', }), +]