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

check for subuid/subgid fails with 'is not a directory' error #69

Open
hmoffatt opened this issue Nov 21, 2022 · 1 comment
Open

check for subuid/subgid fails with 'is not a directory' error #69

hmoffatt opened this issue Nov 21, 2022 · 1 comment

Comments

@hmoffatt
Copy link

I am getting the following message when the subuid / subgid check runs:

TASK [ikke_t.podman_container_systemd : check if user is in subuid file] ************************************************************************************************************************
[WARNING]: Skipped '/etc/subuid' path due to this access issue: '/etc/subuid' is not a directory
ok: [vm-dbx] => {"changed": false, "examined": 0, "files": [], "matched": 0, "msg": "Not all paths examined, check warnings for details", "skipped_paths": {"/etc/subuid": "'/etc/subuid' is not a directory"}}

TASK [ikke_t.podman_container_systemd : check if group is in subgid file] ***********************************************************************************************************************
[WARNING]: Skipped '/etc/subgid' path due to this access issue: '/etc/subgid' is not a directory
ok: [vm-dbx] => {"changed": false, "examined": 0, "files": [], "matched": 0, "msg": "Not all paths examined, check warnings for details", "skipped_paths": {"/etc/subgid": "'/etc/subgid' is not a directory"}}

I think this is caused by ansible.builtin.file being passed a single filename, while the documentation says it expects a directory.

@hmoffatt
Copy link
Author

I think it should use lineinfile with check_mode: yes and so on, as in https://www.middlewareinventory.com/blog/ansible-search-string-file-check-if-string-exists/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant