Skip to content

Commit aed0113

Browse files
committed
update playground playbooks
1 parent 3d8ab84 commit aed0113

12 files changed

+69
-71
lines changed

.ansible-lint

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
skip_list:
3-
- fqcn[action-core]
43
- name[template]
54
- role-name
65
- schema[meta]
76
- yaml[line-length]
87
- yaml[comments-indentation]
98

109
exclude_paths:
10+
- .ansible/
1111
- .git/
1212
- .github/
13+
- roles/*/tests/
1314
- venv/

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ collections/*
88
# inventory/*
99
# playbooks/*
1010
roles/*
11+
12+
.env
13+
.envrc
1114
ansible.cfg
1215
venv

host_vars/ansible-client-ubuntu.yml

-11
This file was deleted.

inventory/inventory.yml

+24-12
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,48 @@
11
---
22
all:
3+
vars:
4+
ansible_python_interpreter: /usr/bin/python3
5+
ansible_ssh_connection: ssh
6+
ansible_ssh_common_args: |
7+
-o IdentitiesOnly=yes
8+
-o StrictHostKeyChecking=no
9+
-o UserKnownHostsFile=/dev/null
10+
ansible_ssh_transfer_method: scp
311
children:
412
# local:
513
# hosts:
614
# localhost:
715
# ansible_connection: local
816
clients:
9-
vars:
10-
ansible_python_interpreter: /usr/bin/python3
11-
ansible_ssh_connection: ssh
12-
ansible_ssh_common_args: "-o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
13-
ansible_ssh_transfer_method: scp
1417
children:
1518
deb_based:
1619
children:
1720
debian:
1821
hosts:
19-
ansible-client-debian:
22+
ansible-client-debian12:
2023
ansible_ssh_user: root
2124
ansible_ssh_private_key_file: ~/.ssh/id_rsa
22-
# ubuntu:
23-
# hosts:
24-
# ansible-client-ubuntu:
25-
# ansible_ssh_user: root
26-
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
25+
ubuntu:
26+
hosts:
27+
ansible-client-ubuntu24:
28+
ansible_ssh_user: root
29+
ansible_ssh_private_key_file: ~/.ssh/id_rsa
30+
# ansible-client-ubuntu22:
31+
# ansible_ssh_user: root
32+
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
33+
# ansible-client-ubuntu20:
34+
# ansible_ssh_user: root
35+
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
2736
rpm_based:
2837
children:
2938
almalinux:
3039
hosts:
31-
ansible-client-alma:
40+
ansible-client-alma9:
3241
ansible_ssh_user: root
3342
ansible_ssh_private_key_file: ~/.ssh/id_rsa
43+
# ansible-client-alma8:
44+
# ansible_ssh_user: root
45+
# ansible_ssh_private_key_file: ~/.ssh/id_rsa
3446
# suse:
3547
# hosts:
3648
# ansible-client-suse:

play_manage_users.yml

-30
This file was deleted.

play_setup_ufw.yml

-16
This file was deleted.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
user_management_host_ssh_from:
3+
- 8.8.8.8

playbooks/play_manage_users.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
- name: Play for managing linux users
3+
hosts: all
4+
gather_facts: false
5+
6+
# Requires role 'user_management' mentioned in 'requirements.yml'
7+
roles:
8+
- role: user_management
9+
vars:
10+
user_management_default_secondary_groups: [playground]
11+
user_management_users:
12+
- name: john.doe
13+
state: present
14+
ssh_public_keys:
15+
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDW6k6qtP1YfJ7eOSN1zDf8C6lTJuV+ethOvEJwTKJrGoQrKKukVfedjUL+e7XMszVT57iiV8rC+syZsJ6wkwJR2ahOUlU9hACbRc+X5mmVROLKlO+NaxrbMzsTJXeCJK6Oo+05f2kSPqGfjV3CZSq4Xv5mUMhaDkGUg/rqG5BIdqFDwirqxbUbPOIYeosLT1tbgxHvOTwsUqulEZS5h8mOt1Hahi1ZrfUOyharJvpc5rzYk/hq1zwTXTNtArOLCaSbvY+o61BAsnQBzg6Z+Elyrox53kWW8c0MuG0iPfehqW20eE9xZVBQfwutLmMHMNeUD2UwLDfxnoVXIlgn5T4Z4F2uMyKWKl9IsoIuguizX98SuASEXg4wsAEf2MSCxwk7AGO3yCgqRsnm7sIEEdvxUIewcuZn1ZtN0c3UjcsqRnoXgBOXpynsRStdZTPTM+o1LGma+Wp8FkMH1ZnuQ+BrCQ1ENKcS4oeTcG91Ud9Yiu/qfWVU64RrYpz0JvHWoApdzM73Xro2Sz9BuQH5uSCIya8PNEqGdH1GRDxbDkv41+scWwq/5i5CSlWmNogU377tPld9hqJJA//eniErgKO/QSJKmaDDzFe+eQh6F2Kn/NUVKqbPHbDlkYAZGT37L5iCOG1By55wwnemz40GS2Wo+a4nViDJGhuFty+4yR8fWQ== ansible-playground_20231122_194549
16+
- role: sudoers
17+
vars:
18+
sudoers_install_sudo: true
19+
20+
sudoers_manage_group_files: true
21+
sudoers_groups:
22+
- name: sudoers_group_file
23+
group: sudoers_mygroupname
24+
commands:
25+
- ALL
26+
nopassword: true
27+
state: present
28+
29+
sudoers_manage_user_files: true
30+
sudoers_users:
31+
- name: sudoers_user_file
32+
user: john.doe
33+
commands:
34+
- ALL
35+
nopassword: true
36+
state: present
File renamed without changes.

requirements.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ collections:
77
roles:
88
- name: user_management
99
src: xenion1987.user_management
10-
- name: user_management
10+
- name: sudoers
1111
src: xenion1987.sudoers

roles/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)