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
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:
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