Enlist the differences between variable name and environment variables.

devquora
devquora

Posted On: Feb 22, 2018

 

Variable Name Environment variables
To build variable names, you need to add strings.To access environment variables, you have to access existing variables.
It allows adding more strings.We need to see advances playbook section to set environment variables.
We use the ipv4 address for variable names.We use {{ ansible_env.SOME_VARIABLE }} for remote environment variables.
{{ hostvars[inventory_hostname][‘ansible_’ + which_interface][‘ipv4′][‘address’]

}}

# … vars: local_home: ”

{{ lookup(‘env’,’HOME’) }}”

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Ansible Interview Questions

    What is Ansible?

    Ansible is an open source automation platform which can help you with configuration management, task automation and appl..

    Ansible Interview Questions

    Talk about Ansible architecture.

    Ansible works on ‘agentless architecture’. It works by connecting to your nodes and pushes out Ansible modules to th..

    Ansible Interview Questions

    List some advantages of using Ansible.

    Unlike other configuration management system, Ansible is the most sought after software applications these days. it off..