mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12865 from aidanhs/aphs-document-env-vars-play
Document setting environment variables in a playbook
This commit is contained in:
commit
cc41354733
1 changed files with 11 additions and 0 deletions
|
@ -33,6 +33,17 @@ The environment can also be stored in a variable, and accessed like so::
|
|||
- apt: name=cobbler state=installed
|
||||
environment: proxy_env
|
||||
|
||||
You can also use it at a playbook level::
|
||||
|
||||
- hosts: testhost
|
||||
|
||||
roles:
|
||||
- php
|
||||
- nginx
|
||||
|
||||
environment:
|
||||
http_proxy: http://proxy.example.com:8080
|
||||
|
||||
While just proxy settings were shown above, any number of settings can be supplied. The most logical place
|
||||
to define an environment hash might be a group_vars file, like so::
|
||||
|
||||
|
|
Loading…
Reference in a new issue