Master in Devops | Ansible Roles | Ansible Variables | Ansible Handlers

preview_player
Показать описание
in this tutorial, you will learn about Ansible Playbooks and roles variables and Handlers Inventories.
Roles provide a framework for fully independent, or interdependent collections of variables, tasks, files, templates, and modules. In Ansible, the role is the primary mechanism for breaking a playbook into multiple files. This simplifies writing complex playbooks, and it makes them easier to reuse.
You can decide where to set a variable based on the scope you want that value to have. Ansible has three main scopes: Global: this is set by config, environment variables and the command line. Play: each play and contained structures, vars entries (vars; vars_files; vars_prompt), role defaults and vars.
Handlers are just like regular tasks in an Ansible playbook (see Tasks) but are only run if the Task contains a notify directive and also indicates that it changed something. ... A host is simply a remote machine that Ansible manages. They can have individual variables assigned to them, and can also be organized in groups.

ansible handlers

ansible roles variables
#devops #ansible #devops
Рекомендации по теме
Комментарии
Автор

this ansible tutorial is good for beginners thanks for sharing

harishravipati
Автор

Used this tutorial. Had an error when I didn’t create user with same name on both host and control node. But worked when I pass the username with -u while performing the ping

gautam
Автор

Where can i find the source code of the examples?

diegocamilopenaramirez