Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding l3d.users collection #41

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@
[submodule "collections/ansible_collections/l3d/time"]
path = collections/ansible_collections/l3d/time
url = https://github.com/roles-ansible/ansible_collection_time.git
[submodule "collections/ansible_collections/l3d/users"]
path = collections/ansible_collections/l3d/users
url = https://github.com/roles-ansible/ansible_collection_users.git
2 changes: 1 addition & 1 deletion collections/ansible_collections/community/general
Submodule general updated 230 files
1 change: 1 addition & 0 deletions collections/ansible_collections/l3d/users
Submodule users added at 406e3c
24 changes: 21 additions & 3 deletions group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
---
#
# roles/dotfiles
# l3d.users
# l3d.users.user
# -> define users
l3d_users__default_users:
- name: 'l3d'
state: 'present'
shell: '/bin/bash'
create_home: true
pubkeys: "{{ lookup('url', 'https://github.com/do1jlr.keys', split_lines=False) }}"
exklusive_pubkeys: true
admin: true
admin_commands: 'ALL'
admin_nopassword: false
admin_ansible_login: true
- name: 'alice'
state: 'absent'

#
# enable keychain as ssh agent
dotfiles__additional_user_bashrc_lines:
# l3d.users
# l3d.users.user
# -> enable keychain as ssh agent
l3d_users__dotfiles__additional_user_bashrc_lines:
- '[[ $- == *i* ]] && eval $(keychain --eval --quiet id_ed25519)'
- '_gopass_bash_autocomplete() {'
- ' local cur opts base'
Expand Down
15 changes: 15 additions & 0 deletions group_vars/work.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#
# l3d.users
# l3d.users.user
l3d_users__local_users:
- name: 'lilian'
state: 'present'
shell: '/bin/bash'
create_home: true
pubkeys: "{{ lookup('url', 'https://github.com/do1jlr.keys', split_lines=False) }}"
exklusive_pubkeys: true
admin: true
admin_commands: 'ALL'
admin_nopassword: false
admin_ansible_login: true
2 changes: 1 addition & 1 deletion roles/amdgpu_firmware
12 changes: 8 additions & 4 deletions site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
roles:
- {role: ansible_version, tags: always}

- name: Generic Workstation Preperation
hosts: all
roles:
- {role: l3d.users.user, tags: user}
- {role: l3d.users.admin, tags: admin}
- {role: l3d.users.sshd, tags: sshd}
- {role: l3d.users.dotfiles, tags: dotfiles}

- name: Generic Workstation Preperation
hosts: all
roles:
Expand All @@ -21,10 +29,6 @@
# - name: user specific setup
# hosts: private
# roles:
# - {role: dotfiles, tags: [default, dotfiles, fancy]}
# - {role: manage_users, tags: [ssh, manage, manage_users]}
# - {role: authorized_keys, tags: [ssh, auth, authorized_keys]}
# - {role: sshd, tags: [ssh, sshd]}
# - {role: akku-warning, tags: [akku, akku_warning, akku-warning]}
# - {role: no-sleep, tags: no_sleep}

Expand Down