The mind game

When your muscles are tense, most of your bodily sensitivity is lost. Your reactions become slower as you are unable to feel the direction of force applied by your training partner. You gas out…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Ansible Variables.

Like any other programming language, the variables are used to store value or information.

There are different way to create and reference variable.

We can also store the variables in separate file as given below.

How to use the variable inside the playbook?

After the variable is defined under the vars- directive, we can reference it inside playbook- we need to put the variable name inside the double curly bracis and close it — {{ }}

Sample code showing the variable usage.

In the above play book, the way variable is put is called jinja2 template- {{ }}

If the variable is starting we need to use quote “”. If used in middle the quote is not required.

This example shows how you can include variables defined in an external file:

More example:

Install apache webserver and copy sample static file to remote server.

Add a comment

Related posts:

Fix Your Life

William James said in 1902 that the New Age is “so moonstruck with optimism and so vaguely expressed” that rational people find the literature almost impossible to read and Sam Harris says “the New…

Xbox 360 controller usb driver windows 10 download

. Plug the Xbox 360 controller into any USB 2.0 or 3.0 port on the computer. Windows 10 will automatically install drivers for your controller, so you won’t have to download or install software other…

8 Ways to Prevent Baths and Showers from Aggravating Psoriasis.

Psoriasis is a skin condition characterized by dryness and irritation, which can be exacerbated by bathing and showering. However, with proper care and attention, it is possible to minimize the…