Debian Codegraph @

lib/ansible/plugins/doc_fragments/shell_common.py

raw
1 # Copyright (c) 2017 Ansible Project
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3 from __future__ import annotations
4
5
6 class ModuleDocFragment(object):
7
8 # common shelldocumentation fragment
9 DOCUMENTATION = """
10 options:
11 remote_tmp:
12 description:
13 - Temporary directory to use on targets when executing tasks.
14 default: '~/.ansible/tmp'
15 env: [{name: ANSIBLE_REMOTE_TEMP}, {name: ANSIBLE_REMOTE_TMP}]
16 ini:
17 - section: defaults
18 key: remote_tmp
19 vars:
20 - name: ansible_remote_tmp
21 common_remote_group:
22 name: Enables changing the group ownership of temporary files and directories
23 default: null
24 description:
25 - Checked when Ansible needs to execute a module as a different user.
26 - If setfacl and chown both fail and do not let the different user access the module's files, they will be chgrp'd to this group.
27 - In order for this to work, the remote_user and become_user must share a common group and this setting must be set to that group.
28 env: [{name: ANSIBLE_COMMON_REMOTE_GROUP}]
29 vars:
30 - name: ansible_common_remote_group
31 ini:
32 - {key: common_remote_group, section: defaults}
33 version_added: "2.10"
34 system_tmpdirs:
35 description:
36 - "List of valid system temporary directories on the managed machine for Ansible to validate
37 O(remote_tmp) against, when specific permissions are needed. These must be world
38 readable, writable, and executable. This list should only contain directories which the
39 system administrator has pre-created with the proper ownership and permissions otherwise
40 security issues can arise."
41 - When O(remote_tmp) is required to be a system temp dir and it does not match any in the list,
42 the first one from the list will be used instead.
43 default: [ /var/tmp, /tmp ]
44 type: list
45 elements: string
46 env: [{name: ANSIBLE_SYSTEM_TMPDIRS}]
47 ini:
48 - section: defaults
49 key: system_tmpdirs
50 vars:
51 - name: ansible_system_tmpdirs
52 async_dir:
53 description:
54 - Directory in which ansible will keep async job information.
55 default: '~/.ansible_async'
56 env: [{name: ANSIBLE_ASYNC_DIR}]
57 ini:
58 - section: defaults
59 key: async_dir
60 vars:
61 - name: ansible_async_dir
62 admin_users:
63 type: list
64 elements: string
65 default: ['root', 'toor']
66 description:
67 - list of users to be expected to have admin privileges. This is used by the controller to
68 determine how to share temporary files between the remote user and the become user.
69 env:
70 - name: ANSIBLE_ADMIN_USERS
71 ini:
72 - section: defaults
73 key: admin_users
74 vars:
75 - name: ansible_admin_users
76 world_readable_temp:
77 version_added: '2.10'
78 default: False
79 description:
80 - This makes the temporary files created on the machine world-readable and will issue a warning instead of failing the task.
81 - It is useful when becoming an unprivileged user.
82 env:
83 - name: ANSIBLE_SHELL_ALLOW_WORLD_READABLE_TEMP
84 vars:
85 - name: ansible_shell_allow_world_readable_temp
86 ini:
87 - {key: allow_world_readable_tmpfiles, section: defaults}
88 type: boolean
89 """