mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-06-10 10:35:54 +00:00
acl: correctly assert needed changes when recursive is true
SUMMARY
Right now, when setting recursive ACLs on a directory, all files in the directory are tested to check if a change is needed. If a single file has expected ACLs already set, then the test returns False and no changes are applied.
Fixes #592
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
acl
ADDITIONAL INFORMATION
I'm very much a beginner in Python, so any criticism is welcome.
Reviewed-by: Hideki Saito <saito@fgrep.org>
(cherry picked from commit c4b1c2b0fb)
Co-authored-by: centosinfra-prod-github-app[bot] <161850885+centosinfra-prod-github-app[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
---
|
||||
# (c) 2017, Martin Krizek <mkrizek@redhat.com>
|
||||
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
- name: Test ACL
|
||||
vars:
|
||||
@@ -22,6 +8,7 @@
|
||||
test_group: ansible_group
|
||||
test_file: "{{ output_dir }}/ansible file"
|
||||
test_dir: "{{ output_dir }}/ansible_dir/with some space"
|
||||
test_recursive_dir: "{{ output_dir }}/recursive_dir"
|
||||
block:
|
||||
- name: Include tests task file
|
||||
ansible.builtin.include_tasks: acl.yml
|
||||
|
||||
Reference in New Issue
Block a user