docs: comment out temp files section until I have a chance to write it.

pull/862/head
David Wilson 7 years ago
parent 5667116f58
commit 3c63290445

@ -424,82 +424,84 @@ specific variables with a particular linefeed style.
.. _ansible_tempfiles: .. _ansible_tempfiles:
Temporary Files ...
~~~~~~~~~~~~~~~
Temporary Files
Temporary file handling in Ansible is incredibly tricky business, and the exact ~~~~~~~~~~~~~~~
behaviour varies across major releases.
Temporary file handling in Ansible is incredibly tricky business, and the exact
Ansible creates a variety of temporary files and directories depending on its behaviour varies across major releases.
operating mode.
Ansible creates a variety of temporary files and directories depending on its
In the best case when pipelining is enabled and no temporary uploads are operating mode.
required, for each task Ansible will create one directory below a
system-supplied temporary directory returned by :func:`tempfile.mkdtemp`, owned In the best case when pipelining is enabled and no temporary uploads are
by the target account a new-style module will execute in. required, for each task Ansible will create one directory below a
system-supplied temporary directory returned by :func:`tempfile.mkdtemp`, owned
In other cases depending on the task type, whether become is active, whether by the target account a new-style module will execute in.
the target become user is privileged, whether the associated action plugin
needs to upload files, and whether the associated module needs to store files, In other cases depending on the task type, whether become is active, whether
Ansible may: the target become user is privileged, whether the associated action plugin
needs to upload files, and whether the associated module needs to store files,
* Create a directory owned by the SSH user either under ``remote_tmp``, or a Ansible may:
system-default directory,
* Upload action dependencies such as non-new style modules or rendered * Create a directory owned by the SSH user either under ``remote_tmp``, or a
templates to that directory via `sftp(1)`_ or `scp(1)`_. system-default directory,
* Attempt to modify the directory's access control list to grant access to the * Upload action dependencies such as non-new style modules or rendered
target user using `setfacl(1) <https://linux.die.net/man/1/setfacl>`_, templates to that directory via `sftp(1)`_ or `scp(1)`_.
requiring that tool to be installed and a supported filesystem to be in use, * Attempt to modify the directory's access control list to grant access to the
or for the ``allow_world_readable_tmpfiles`` setting to be :data:`True`. target user using `setfacl(1) <https://linux.die.net/man/1/setfacl>`_,
* Create a directory owned by the target user either under ``remote_tmp``, or requiring that tool to be installed and a supported filesystem to be in use,
a system-default directory, if a new-style module needs a temporary directory or for the ``allow_world_readable_tmpfiles`` setting to be :data:`True`.
and one was not previously created for a supporting file earlier in the * Create a directory owned by the target user either under ``remote_tmp``, or
invocation. a system-default directory, if a new-style module needs a temporary directory
and one was not previously created for a supporting file earlier in the
In summary, for each task Ansible may create one or more of: invocation.
* ``~ssh_user/<remote_tmp>/...`` owned by the login user, In summary, for each task Ansible may create one or more of:
* ``$TMPDIR/ansible-tmp-...`` owned by the login user,
* ``$TMPDIR/ansible-tmp-...`` owned by the login user with ACLs permitting * ``~ssh_user/<remote_tmp>/...`` owned by the login user,
write access by the become user, * ``$TMPDIR/ansible-tmp-...`` owned by the login user,
* ``~become_user/<remote_tmp>/...`` owned by the become user, * ``$TMPDIR/ansible-tmp-...`` owned by the login user with ACLs permitting
* ``$TMPDIR/ansible_<modname>_payload_.../`` owned by the become user, write access by the become user,
* ``$TMPDIR/ansible-module-tmp-.../`` owned by the become user. * ``~become_user/<remote_tmp>/...`` owned by the become user,
* ``$TMPDIR/ansible_<modname>_payload_.../`` owned by the become user,
* ``$TMPDIR/ansible-module-tmp-.../`` owned by the become user.
Mitogen for Ansible
^^^^^^^^^^^^^^^^^^^
Mitogen for Ansible
Temporary h ^^^^^^^^^^^^^^^^^^^
Temporary directory handling is fiddly and varies across major Ansible
releases. Temporary h
Temporary directory handling is fiddly and varies across major Ansible
releases.
Temporary directories must exist to maintain compatibility with Ansible, as
many modules introspect :data:`sys.argv` to find a directory where they may
write files, however only one directory exists for the lifetime of each Temporary directories must exist to maintain compatibility with Ansible, as
interpreter, its location is consistent for each target account, and it is many modules introspect :data:`sys.argv` to find a directory where they may
always privately owned by that account. write files, however only one directory exists for the lifetime of each
interpreter, its location is consistent for each target account, and it is
The paths below are tried until one is found that is writeable and lives on a always privately owned by that account.
filesystem with ``noexec`` disabled:
The paths below are tried until one is found that is writeable and lives on a
1. ``$variable`` and tilde-expanded ``remote_tmp`` setting from filesystem with ``noexec`` disabled:
``ansible.cfg``
2. ``$variable`` and tilde-expanded ``system_tmpdirs`` setting from 1. ``$variable`` and tilde-expanded ``remote_tmp`` setting from
``ansible.cfg`` ``ansible.cfg``
3. ``TMPDIR`` environment variable 2. ``$variable`` and tilde-expanded ``system_tmpdirs`` setting from
4. ``TEMP`` environment variable ``ansible.cfg``
5. ``TMP`` environment variable 3. ``TMPDIR`` environment variable
6. ``/tmp`` 4. ``TEMP`` environment variable
7. ``/var/tmp`` 5. ``TMP`` environment variable
8. ``/usr/tmp`` 6. ``/tmp``
9. Current working directory 7. ``/var/tmp``
8. ``/usr/tmp``
The directory is created once at startup, and subdirectories are automatically 9. Current working directory
created and destroyed for every new task. Management of subdirectories happens
on the controller, but management of the parent directory happens entirely on The directory is created once at startup, and subdirectories are automatically
the target. created and destroyed for every new task. Management of subdirectories happens
on the controller, but management of the parent directory happens entirely on
the target.
.. _ansible_process_env: .. _ansible_process_env:

Loading…
Cancel
Save