Re: [ansible-devel] Regression using variables availabe after gathering facts when specifying environment

2018-11-09 Thread Brian Coca
or just add 'default' for when fact gathering runs: PIP_INDEX_URL: "{{ 'https://mirrors.aliyun.com/pypi/simple' if (ansible_domain|default('')).startswith('cn') else 'https://pypi.org/simple' }}" -- -- Brian Coca -- You received this message because you are subscribed to the Google

Re: [ansible-devel] Regression using variables availabe after gathering facts when specifying environment

2018-11-09 Thread Rastislav Barlik
This looks like a regression and should be fixed. For a workaround, I would suggest to add an empty play that would only gather facts. --- # A dummy play to gather facts - hosts: host - hosts: host become: yes roles: - role: role1 - role: role2 - role: role3 environment:

[ansible-devel] Regression using variables availabe after gathering facts when specifying environment

2018-11-08 Thread Koen Smets
Dear all, Before upgrading to ansible-2.7.x, I was able to run the following playbook. --- - hosts: host become: yes roles: - role: role1 - role: role2 - role: role3 environment: PIP_INDEX_URL: "{{ 'https://mirrors.aliyun.com/pypi/simple' if ansible_domain.startswith('cn') else