Best practice

Test syntax

shell> ansible-playbook playbook.yml --syntax-check

See what variables will be included

shell> ansible-playbook playbook.yml -t fp_debug -e fp_debug=true

Dry-run and display changes

shell> ansible-playbook playbook.yml --check --diff

Install packages. Run this task separately if the installation takes too long. Then disable it.

shell> ansible-playbook playbook.yml -t fp_packages -e fp_install=true

Run the playbook

shell> ansible-playbook playbook.yml -e fp_install=false

Test the idempotency. The role and the configuration data shall be idempotent. There should be no changes reported by ansible-playbook when the playbook is run repeatedly. Disable the debug output, and the installation of packages or ports to speedup the playbook.

 shell> ansible-playbook playbook.yml