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

Fix: move to single file to allow task inclusion #3

Merged
merged 1 commit into from
Oct 30, 2023
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
12 changes: 0 additions & 12 deletions tasks/gather_vars.yml

This file was deleted.

4 changes: 0 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
- name: Include 'user_facts' tasks
ansible.builtin.import_tasks: user_facts.yml

# Gather variables
- name: Include 'gather_vars' tasks
ansible.builtin.import_tasks: gather_vars.yml

# Manage directories
- name: Include 'directories' tasks
ansible.builtin.import_tasks: directories.yml
Expand Down
11 changes: 11 additions & 0 deletions tasks/set_access_control.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
---
- name: Gather ACL entries
block:
- name: Find variables starting with '{{ __svc_acl_var_prefix }}'
ansible.builtin.set_fact:
__svc_acl_matches: "{{ lookup('ansible.builtin.varnames', '^{{ __svc_acl_var_prefix }}(_)?.*') | split(',') }}"

- name: Merge svc_acl entries
ansible.builtin.set_fact:
__svc_access_control_list: "{{ __svc_access_control_list + lookup('ansible.builtin.vars', item) }}"
with_items: "{{ __svc_acl_matches }}"

- name: Set access control on files
ansible.posix.acl:
path: "{{ item.path }}"
Expand Down
Loading