Ansible Best Practices - workshops
https://aap2.demoredhat.com/decks/ansible_best_practices.pdf
Treat your Ansible content like codeDo it with styleCODE MUST BE ORGANIZEDDo it with styleStart with one Git repository - but when it grows,Know where your variables areMAKE YOUR PLAYBOOK READABLEBetter, but noPOWERFUL BLOCKSPROPER LAUNCHINGAnsible has switches to show you what will be doneIf there is a need to launch something without an inventoryTry to avoid the command module - always seek out a module firstIf managed files are not marked, they might be overwritten accidentallyROLES AND GALAXIESGet roles from Galaxy, but be careful and adopt them to your needsRoot access is harder to track than sudo - use sudo wherever possibleExecute with:Simple: Use Tower.Tower has inbuilt helpTower can import a repository multiple times with different branchesTower automatically imports Roles during Project updateUse dynamic & smart inventoriesMultiple playbooks can be combined into one workflowUse surveys to get variable valuesTower provides tenants, teams, and users - use them for separationTower credentials should only be used by Tower - not by othersSend all logs from Tower to central loggingTower can be easily set up HA - and for restricted networks, deploy isolated nodesUse the power of included options: --list-tasks --list-tags --list-hosts --syntax-check QUICKLY LAUNCH WITHOUT INVENTORYSee more on aap2.demoredhat.com Use the power of included options: --list-tasks --list-tags --list-hosts --syntax-check QUICKLY LAUNCH WITHOUT INVENTORY File Size: 8MB Page Count: 67
Use the power of included options: --list-tasks --list-tags --list-hosts --syntax-check QUICKLY LAUNCH WITHOUT INVENTORY
File Size: 8MB
Page Count: 67
DA: 59 PA: 42 MOZ Rank: 60