rougail-tutorials/Ansible/inventory/group_vars/all/proxy.yml
Emmanuel Garette f1a276f3d5 [tutorial Ansible 1.4] a variable with multiple values
Proxy configuration
===================

Add env_proxy.no_proxy for proxy exception

---
env_proxy:
  host: proxy.example.net
  no_proxy:
    - localhost
    - 192.168.1.1
    - .ac-dijon.fr

Examples of Ops inventory file
==============================

1/ INVALID, must be a list:

---
env_proxy:
  host: proxy.example.net
  no_proxy: localhost

2/ INVALID, an integer:

---
env_proxy:
  host: proxy.example.net
  no_proxy:
    - 1

3/ INVALID, without value:

---
env_proxy:
  host: proxy.example.net
2023-12-18 11:34:32 +01:00

5 lines
136 B
YAML

---
env_proxy_all:
host: "{{ env_proxy.host }}"
port: "{{ env_proxy.port | default(3128) }}"
no_proxy: "{{ env_proxy.no_proxy }}"