Best practice
Recommended configuration after the installation of OS
Test the syntax
shell> ansible-playbook lp.yml --syntax-check
What variables will be included?
shell> ansible-playbook lp.yml -t lp_debug -e lp_debug=True
Test the auto-installation of packages
shell> ansible-playbook lp.yml -t lp_packages -e lp_packages_auto=true -CD
Auto-install packages
shell> ansible-playbook lp.yml -t lp_packages -e lp_packages_auto=true
Dry run, display differences and display variables
shell> ansible-playbook lp.yml -e lp_debug=True --check --diff
Install packages. Configure hostname, users, sudoers, network and reboot
shell> ansible-playbook lp.yml -t lp_packages
shell> ansible-playbook lp.yml -t lp_hostname
shell> ansible-playbook lp.yml -t lp_users
shell> ansible-playbook lp.yml -t lp_sudoers
shell> ansible-playbook lp.yml -t lp_udev
shell> ansible-playbook lp.yml -t lp_netplan
shell> ansible-playbook lp.yml -t lp_wpasupplicant
shell> ansible-playbook lp.yml -t lp_reboot -e lp_reboot=true lp_reboot_force=true
Configure firewall
shell> ansible-playbook lp.yml -t lp_iptables
Run the playbook
shell> ansible-playbook lp.yml
Test the idempotency. The role and the configuration data shall be idempotent. Once the installation and configuration have passed there should be no changes reported by ansible-playbook when running the playbook repeatedly. To speedup the playbook disable debug, and install, and run the playbook again.
shell> ansible-playbook lp.yml
Flavors
<TBD>