All technological notes.
Module
task to be executedTask
Play
playbook that maps a set of tasks to a specific group of hosts.gather_facts or become).Playbook
control node, managing subprocesses for tasks and connections to hosts.Command to run a playbook
ansible-playbook playbook_filehosts:
tasks:
Ansible modules) to execute.vars:
gather_facts:
Good practices to verify playbook before executing in production.
Type of mode provided for verification:
Check mode:
ansible-playbook playbook_file --checkcheck modeDiff mode:
check modeansible-playbook playbook_file --check --diffansible-playbook playbook_file --syntax-checkAnsible Lint
ansible-lint playbook.yml
# WARNING Listing 2 violation(s) that are fatal
# fqcn[action-core]: Use FQCN for builtin module actions (debug).
# get_fact_variable.yaml:4 Use `ansible.builtin.debug` or `ansible.legacy.debug` instead.
# fqcn[action-core]: Use FQCN for builtin module actions (debug).
# get_fact_variable.yaml:8 Use `ansible.builtin.debug` or `ansible.legacy.debug` instead.
# Read documentation for instructions on how to ignore specific rule violations.
# Rule Violation Summary
# count tag profile rule associated tags
# 2 fqcn[action-core] production formatting
# Failed: 2 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'shared'. Rating: 4/5 star