mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-04 16:03:09 +02:00
Removed generation of alphanumeric users
This commit is contained in:
parent
e032fd1aa4
commit
a3fd74c2e0
3
Makefile
3
Makefile
@ -1,6 +1,6 @@
|
||||
ROLES_DIR := ./roles
|
||||
APPLICATIONS_OUT := ./group_vars/all/04_applications.yml
|
||||
APPLICATIONS_SCRIPT := ./cli/generate-applications-defaults.py
|
||||
APPLICATIONS_SCRIPT := ./cli/generate_applications.py
|
||||
USERS_OUT := ./group_vars/all/03_users.yml
|
||||
USERS_SCRIPT := ./cli/generate_users.py
|
||||
INCLUDES_OUT := ./tasks/utils/docker-roles.yml
|
||||
@ -9,6 +9,7 @@ INCLUDES_SCRIPT := ./cli/generate_playbook.py
|
||||
EXTRA_USERS := $(shell \
|
||||
find $(ROLES_DIR) -maxdepth 1 -type d -name 'docker*' -printf '%f\n' \
|
||||
| sed -E 's/^docker[_-]?//' \
|
||||
| grep -E -x '[a-z0-9]+' \
|
||||
| paste -sd, - \
|
||||
)
|
||||
|
||||
|
@ -44,9 +44,6 @@ users:
|
||||
proxy:
|
||||
username: proxy
|
||||
description: "Proxy user"
|
||||
www-data:
|
||||
username: www-data
|
||||
description: "Web server user"
|
||||
backup:
|
||||
username: backup
|
||||
description: "Backup operator"
|
||||
|
@ -43,7 +43,7 @@ class TestGenerateDefaultApplicationsUsers(unittest.TestCase):
|
||||
When a users.yml exists with defined users, the script should inject a 'users'
|
||||
mapping in the generated YAML, mapping each username to a Jinja2 reference.
|
||||
"""
|
||||
script_path = Path(__file__).resolve().parents[2] / "cli" / "generate-applications-defaults.py"
|
||||
script_path = Path(__file__).resolve().parents[2] / "cli" / "generate_applications.py"
|
||||
result = subprocess.run([
|
||||
"python3", str(script_path),
|
||||
"--roles-dir", str(self.roles_dir),
|
||||
|
@ -29,7 +29,7 @@ class TestGenerateDefaultApplications(unittest.TestCase):
|
||||
shutil.rmtree(self.temp_dir)
|
||||
|
||||
def test_script_generates_expected_yaml(self):
|
||||
script_path = Path(__file__).resolve().parent.parent.parent / "cli" / "generate-applications-defaults.py"
|
||||
script_path = Path(__file__).resolve().parent.parent.parent / "cli" / "generate_applications.py"
|
||||
|
||||
result = subprocess.run(
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user