1
0
Fork 0
mirror of https://github.com/DO1JLR/ansible_linux_desktop_setup.git synced 2024-09-14 19:54:51 +02:00

update inventory

This commit is contained in:
L3D 2024-07-27 19:34:54 +02:00
parent 880ca24302
commit 54cb6f2888
Signed by: l3d
GPG key ID: CD08445BFF4313D1
5 changed files with 20 additions and 10 deletions

6
.gitmodules vendored
View file

@ -58,9 +58,6 @@
[submodule "roles/l3d.packages"]
path = roles/l3d.packages
url = https://github.com/roles-ansible/ansible_role_packages.git
[submodule "roles/l3d.gopass"]
path = roles/l3d.gopass
url = https://github.com/roles-ansible/ansible_role_gopass.git
[submodule "roles/l3d.etesync_dav"]
path = roles/l3d.etesync_dav
url = https://github.com/roles-ansible/ansible_role_etesync_dav.git
@ -73,3 +70,6 @@
[submodule "collections/ansible_collections/l3d/wm"]
path = collections/ansible_collections/l3d/wm
url = https://github.com/roles-ansible/ansible_collection_wm.git
[submodule "roles/roles-ansible.gopass"]
path = roles/roles-ansible.gopass
url = https://github.com/roles-ansible/ansible_role_gopass.git

View file

@ -7,10 +7,12 @@ import socket
import sys
import json
INIT_HOST=False
# create a dict to match hostnames to enviroments
env_dict = {
'work':
['workstation.local', 'daringdoo.local'],
[],
'private':
['derpy.local', 'applejack.local', 'rarity.local', 'discord.local']
}
@ -44,6 +46,8 @@ def env(domain):
for key, values in env_dict.items():
if domain in values:
return key
if INIT_HOST:
return str('init')
print(json.dumps(empty_host_list(domain), sort_keys=True, indent=2))
sys.exit()
@ -59,8 +63,10 @@ def hostvars(host, group):
"""
set variables to local connection
"""
local = str('"' + host + '": {"ansible_connection": "local", '
+ str(become_pass(host, group)) + '}')
local = str('"' + host + '": {"ansible_connection": "local"')
if not INIT_HOST:
local += str(', ' + str(become_pass(host, group)))
local += str('}')
return local
def formated_host_group_list(host, group):

@ -1 +0,0 @@
Subproject commit bf76fcc81e5687009d6897b1a80e8f5d19b9ab47

@ -0,0 +1 @@
Subproject commit 034a8cd8e1dc151f610a161249cd5ac68846521c

View file

@ -4,8 +4,13 @@
roles:
- {role: ansible_version, tags: always}
- name: Generic Workstation Preperation
- name: Setup GoPass
hosts: all
roles:
- {role: roles-ansible.gopass, tags: gopass}
- name: Generic Workstation Preperation
hosts: [work, private]
roles:
- {role: l3d.users.user, tags: user}
- {role: l3d.users.admin, tags: admin}
@ -13,7 +18,7 @@
- {role: l3d.users.dotfiles, tags: dotfiles}
- name: Generic Workstation Preperation
hosts: all
hosts: [work, private]
roles:
- {role: l3d.packages, tags: [packages, apt]}
- {role: l3d.time.ntp, tags: ntp}
@ -21,7 +26,6 @@
- {role: l3d.avahi.daemon, tags: avahi}
- {role: l3d.etesync_dav, tags: [etebase, etesync, dav]}
- {role: gantsign.bat, tags: bat}
- {role: l3d.gopass, tags: gopass}
- {role: l3d.wm.i3, tags: i3wm}
- {role: l3d.wm.sway, tags: sway}
# - {role: amdgpu_firmware, tags: firmware}