Transcription of Ansible Best Practices
{{id}} {{{paragraph}}}
CONFIDENTIAL Designator1 How to write, how to execute, and how to use in real lifeAnsible best Practices2 GENERAL TIPS TO USE ANSIBLEHow to useTreat your Ansible content like codeAUTOMATION IS CODE3 Version control your Ansible content Iterate Start with a basic playbook and static inventory Refactor and modularize laterDo it with styleCODE NEEDS TO HAVE STYLE GUIDELINES4 Create a style guide for consistency: Tagging Whitespace Naming of Tasks, Plays, Variables, and Roles Directory Layouts Enforce the style Nice example: openshift- Ansible Style Guideexample: MUST BE ORGANIZEDUSE GIT! # master playbook, calling # playbook for webserver # separate playbook for single-shot tasksinventories/ production/ # different stages via inventory hosts # inventory file for production servers group_vars/ host_vars/ london/ # additional, alternative grouping if usefulroles/ # includes roles from some other place common/ # base line, company wide configuration webtier/Do it with styleStart with one Git repository - but when it grows, use multiple!
Ansible Best Practices. 2 GENERAL TIPS TO USE ANSIBLE How to use. Treat your Ansible content like code AUTOMATION IS CODE 3 Version control your Ansible content Iterate Start with a basic playbook and static inventory Refactor and modularize later. Do it with style
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}