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

Adding example to use gid in file module #83049

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/ansible/modules/file.py
Expand Up @@ -133,6 +133,11 @@
group: foo
mode: '0644'

- name: Change file group using gid
ansible.builtin.file:
path: /etc/bar.conf
group: "1000"

- name: Give insecure permissions to an existing file
ansible.builtin.file:
path: /work
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/plugins/doc_fragments/files.py
Expand Up @@ -33,7 +33,7 @@ class ModuleDocFragment(object):
type: raw
owner:
description:
- Name of the user that should own the filesystem object, as would be fed to I(chown).
- Name of the user or gid that should own the filesystem object, as would be fed to I(chown).
Remz42 marked this conversation as resolved.
Show resolved Hide resolved
- When left unspecified, it uses the current user unless you are root, in which
case it can preserve the previous ownership.
- Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion.
Expand Down