ansible

Ansible Ad Hoc Commands Cheat Sheet

Ansible Ad Hoc Commands Cheat Sheet ansible ad-hoc commands are used to run the tasks at onetime. if you want to run multiple times then you have to use ansible playbooks or roles. Ansible...

Ansible configuration in Linux Step By Step

Ansible configuration in Linux Step By Step Ansible is a configuration management tool. To configure ansible in linux you must have installed ansible in your machine. In the following steps i will show you...

Ansible delegate_to Module with Examples

Ansible delegate_to module If you want to run any task on any particular machine you can use ansible delegate_to module. In the following steps i will show how to use ansible delegate to module...

Ansible When Fact Exists/Equals/true/false

Ansible When Fact Equals – hosts: all tasks:- Include: test/main.yml when: ansible_os_family == “RedHat” Here ansible_os_family is the fact variable. If this variable value equals to Redhat then this task will be executed otherwise...

Ansible When File Exists

Ansible When File Exists — – hosts: localhost gather_facts: no tasks: – stat: path: /project/decodingdevops.txt register: result – commannd: cp /project/decodingdevops.txt /project/decodingdevops.backup when: result.stat.exists With ansible, to verify is the file existed or not, ...

ansible when condition examples with RC

Ansible When Condition Examples Ansible when condition is used to execute the tasks if the conditions that you defined are true. If the conditions are not true it will skip the executions of that...