oopen-server/DOC
2024-08-08 00:27:09 +02:00
..
README.ad-hoc Initial commit 2019-06-28 02:28:50 +02:00
README.check-if-empty Initial commit 2019-06-28 02:28:50 +02:00
README.create-file-with-content update.. 2024-08-08 00:27:09 +02:00
README.disable-root-login Initial commit 2019-06-28 02:28:50 +02:00
README.gather-facts Initial commit 2019-06-28 02:28:50 +02:00
README.set-variable-from-command-output update.. 2024-08-08 00:27:09 +02:00
README.troubleshooting Initial commit 2019-06-28 02:28:50 +02:00

# ==========
# running command: Troubleshooting, Tips, and Tricks
# ==========

see also: https://ansible-tips-and-tricks.readthedocs.io/en/latest/ansible/commands/


# ---
# - Busted Cache
# ---

# Sometimes Ansible has a tendency to hold on to variables too long, which causes 
# Ansible to think that a task/operation had already been done or changed when in 
# fact it didn't.
# 
# A simple fix is to flush the redis cache during a code execution.
# 
# This can be done like this:
#
ansible-playbook playbooks/PLAYBOOK_NAME.yml --flush-cache


# ---
# - Check for bad syntax
# ---

# One can check to see if code contains any syntax errors by running the playbook.
# 
# Check for bad syntax:
#
ansible-playbook playbooks/PLAYBOOK_NAME.yml --syntax-check


# ---
# - Running a playbook in dry-run mode
# ---

# Sometimes it can be useful to see what Ansible might do, but without actually 
# changing anything.
# 
# One can run in dry-run mode like this:
#
ansible-playbook playbooks/PLAYBOOK_NAME.yml --check