Can you give example for environment module and also explain about environmnet

+1 vote
Jan 16 in Ansible by vivek
• 510 points
44 views

1 answer to this question.

0 votes

Hi @Vivek

So basically when you are working with remote systems, you'll often encounter situations where you need to work with the remote system's environment variable. The environment module lets you set the environment variables of remote systems.

Example:

- hosts: all
  remote_user: root

  tasks:

    - name: Install cobbler
      package:
        name: cobbler
        state: present
      environment:
        http_proxy: http://proxy.example.com:8080
answered Jan 16 by Kalgi
• 51,810 points
Hi Kalgi,

Thanks for explanation
Glad to help :)

Related Questions In Ansible

0 votes
1 answer

Backup and restore for clustered environment - Ansible

If you're restoring to a new cluster, ...READ MORE

answered Feb 4, 2019 in Ansible by Anushri
100 views
0 votes
1 answer

Error saying "msg: unsupported parameter for module: deb"

Hey @Laksha, I think an older version ...READ MORE

answered Feb 1, 2019 in Ansible by Ansiha
373 views
0 votes
1 answer

Configuration for setting up windows VM using ansible and vagrant

Hey @Leena,  your configuration file group_vars/windows-dev should contain something like: ansible_user: ...READ MORE

answered Feb 4, 2019 in Ansible by Vaishu
107 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer