You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst/reference_appendices/logging.rst

15 lines
1.4 KiB
ReStructuredText

Backport/2.9/docs3 (#63251) * Fixing typo mistake in testbed with section. Deploy template from content library is supported from 67U3 (cherry picked from commit c6c13b56260565dd0ae6cfdbfad3c4191e2a0a5d) * Typo fix in mssql_db (#63184) Changed from 'then' to 'than' (cherry picked from commit b5cc0872e713826c85bdde04e5443be6dca94ebf) * VMware: Update maintenance notes on vmware_cfg_backup (#62853) Maintenance mode seems only to be required for load or restet, not for save_configuration. (cherry picked from commit e977e0af741f55520e3671addcdc433a7792be67) * Misc typo in nxos_config documentation (#62629) * Changed 'exit' to 'exist' * Removed unnecessary word 'first' (cherry picked from commit 0554b50eedae4e8a70fcc2e69d0297c4f5439b7f) * postgresql: add elements for list params to the module's documentation (#63186) (cherry picked from commit 8a37a2440ecbf8407b28b19db2d3c987a367051b) * mysql: add elements for list params to the modules' documentation (#63187) (cherry picked from commit 30c2d21f17832266bb2ba140c6ea530167845098) * Add spaces around {{ indicators. (#63125) The example looked a little less readable by not having spaces after `{{` and before `}}`. This commit should make the examples match [ansible-lint rule 206](https://github.com/ansible/ansible-lint/blob/master/lib/ansiblelint/rules/VariableHasSpacesRule.py) (cherry picked from commit b7a9d99cefe15b248ebc11162529d16babd28d7f) * fix typo in collection/plugins/readme (#63162) (cherry picked from commit da1a9450885bc51b0268b7ec7c0830e35e71583e) * Docs: User guide overhaul, part 1 (#63056) (cherry picked from commit 941a9b68fc262182172e081533e43ccbf60c453f)
5 years ago
**********************
Logging Ansible output
**********************
By default Ansible sends output about plays, tasks, and module arguments to your screen (STDOUT) on the control node. If you want to capture Ansible output in a log, you have three options:
* To save Ansible output in a single log on the control node, set the ``log_path`` :ref:`configuration file setting <intro_configuration>`. You may also want to set ``display_args_to_stdout``, which helps to differentiate similar tasks by including variable values in the Ansible output.
* To save Ansible output in separate logs, one on each managed node, set the ``no_target_syslog`` and ``syslog_facility`` :ref:`configuration file settings <intro_configuration>`.
* To save Ansible output to a secure database, use :ref:`Ansible Tower <ansible_tower>`. Tower allows you to review history based on hosts, projects, and particular inventories over time, using graphs and/or a REST API.
Protecting sensitive data with ``no_log``
=========================================
If you save Ansible output to a log, you expose any secret data in your Ansible output, such as passwords and user names. To keep sensitive values out of your logs, mark tasks that expose them with the ``no_log: True`` attribute. However, the ``no_log`` attribute does not affect debugging output, so be careful not to debug playbooks in a production environment. See :ref:`keep_secret_data` for an example.