Templates/main.yml - templates that the role deploys. Vars/main.yml - other variables for the role (see Using Variables for more information).įiles/main.yml - files that the role deploys. These variables have the lowest priority of any variables available, and can be easily overridden by any other variable, including inventory variables. Library/my_module.py - modules, which may be used within this role (see Embedding modules and plugins in roles for more information).ĭefaults/main.yml - default variables for the role (see Using Variables for more information). Handlers/main.yml - handlers, which may be used within or outside this role. Tasks/main.yml - the main list of tasks that the role executes. j2 files/ # bar.txt # <- files for use with the copy resource foo.sh # <- script files for use with the script resource vars/ # main.yml # <- variables associated with this role defaults/ # main.yml # <- default lower priority variables for this role meta/ # main.yml # <- role dependencies library/ # roles can also include custom modules module_utils/ # roles can also include custom module_utils lookup_plugins/ # or other types of plugins, like lookup in this case webtier/ # same kind of structure as "common" was above, done for the webtier role monitoring/ # "" fooapp/ # ""īy default Ansible will look in each directory within a role for a main.yml file for relevant content (also main.yaml and main): Roles/ common/ # this hierarchy represents a "role" tasks/ # main.yml # <- tasks file can include smaller files if warranted handlers/ # main.yml # <- handlers file templates/ # <- files for use with the template resource 2 # <- templates end in. Controlling how Ansible behaves: precedence rules.Virtualization and Containerization Guides.Protecting sensitive data with Ansible vault. Playbook Example: Continuous Delivery and Rolling Upgrades.Discovering variables: facts and magic variables.Running a role multiple times in one play.Working with language-specific version managers.Controlling where tasks run: delegation and local actions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |