From eb6db1b65d7471268fc53dd9ffb4f34a5f62ba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 25 Sep 2023 16:28:49 +0200 Subject: [PATCH] user: fix naming of groups additional groups var MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- README.md | 2 +- defaults/main.yml | 4 +--- tasks/user.yml | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9493674..0b7f51f 100644 --- a/README.md +++ b/README.md @@ -22,4 +22,4 @@ The `github_webhook_secret` is generated when configuring the webhook in the rep The public key associated to `github_webhook_ssh_key` has to be added as a Deploy key in the repository setting. -The user `github_webhook_service_user` can be added to additional group by overriding the list `github_webhook_user_additional_group`. +The user `github_webhook_service_user` can be added to additional group by overriding the list `github_webhook_user_additional_groups`. diff --git a/defaults/main.yml b/defaults/main.yml index f78dea7..5d9b14d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- github_webhook_service_user: 'github' +github_webhook_service_user_groups: ['www-data'] github_webhook_service_name: '{{ github_webhook_service_user }}-webhook' github_webhook_description: 'GitHub Webhook server for {{ github_webhook_service_user }} repos' # Has to be the UID of Airflow user on the host. @@ -26,6 +27,3 @@ github_webhook_dependencies: # REQUIRED: details of repo to keep updated #github_webhook_repo_url: ~ #github_webhook_repo_branch: ~ - -github_wehbook_user_additional_group: - - 'www-data' diff --git a/tasks/user.yml b/tasks/user.yml index 454a2ad..0407b98 100644 --- a/tasks/user.yml +++ b/tasks/user.yml @@ -6,10 +6,10 @@ - name: Create webhook user user: - name: '{{ github_webhook_service_user }}' - group: '{{ github_webhook_service_user }}' - groups: '{{ github_webhook_user_addtional_group }}' - uid: '{{ github_webhook_service_user_uid }}' + name: '{{ github_webhook_service_user }}' + group: '{{ github_webhook_service_user }}' + groups: '{{ github_webhook_service_user_groups }}' + uid: '{{ github_webhook_service_user_uid }}' create_home: true comment: 'Airflow Webhook User'