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 all commits
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 @@ -41,7 +41,7 @@ class ModuleDocFragment(object):
type: str
group:
description:
- Name of the group that should own the filesystem object, as would be fed to I(chown).
- Name of the group or gid that should own the filesystem object, as would be fed to I(chown).
- When left unspecified, it uses the current group of the current user unless you are root,
in which case it can preserve the previous ownership.
type: str
Expand Down