This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ansible:ansible_presentation [2024/03/24 19:00] manu created |
ansible:ansible_presentation [2024/04/18 00:21] (current) manu [Ansible Role directory structure] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ansible presentation ====== | ====== Ansible presentation ====== | ||
- | {{ansible:ansible01.png?600|}} | + | ===== Ansible Architecture Diagram and Ansible components ===== |
+ | |||
+ | {{ansible:ansible02.png?500|}} | ||
+ | |||
+ | ===== Ansible Role directory structure ===== | ||
+ | |||
+ | {{ansible:ansible01.png?500|}} | ||
+ | |||
+ | * **Tasks:** This directory contains one or more files with tasks . These file can also refer to files and templates without needing to provide the exact path. | ||
+ | * **Handlers:** Add all your handlers in this directory | ||
+ | * **Files:** This directory contains all your static files and scripts that might be copied or executed to remote machine. | ||
+ | * **Templates:** This directory is reserved for templates that generate files on remote hosts. | ||
+ | * **Vars:** You define variables inside this directory and then can be referenced elsewhere in role. | ||
+ | * **defaults:** This directory lets you define default variables for included or dependent role. | ||
+ | * **meta:** This directory is used for dependency management such as dependency roles. | ||
+ | |||
+ | Each directory must contain a main.yml file (or main.yaml or main) that contains the relevant | ||
+ | content for that directory. You can also use other YAML files in some directories to organize | ||
+ | your tasks or variables better. |