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

+1 vote
Jan 16, 2020 in Ansible by vivek
• 530 points
1,062 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, 2020 by Kalgi
• 52,350 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
1,283 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
2,392 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
749 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP