Merge "install-ansible: update venv once a day"
This commit is contained in:
commit
80f08c1f49
@ -45,6 +45,15 @@
|
||||
vars:
|
||||
create_venv_path: '/usr/ansible-venv'
|
||||
|
||||
# The boostrap job runs this all the time, and we'd like to skip
|
||||
# trying to update the venv mostly. But we also want to have things
|
||||
# like ansible specify '<X' so we pick up point releases. By writing
|
||||
# the current day into the requirements.txt, the template updates once
|
||||
# a day, and thus we update the venv just once a day.
|
||||
- name: Get current day
|
||||
shell: 'date +%Y-%m-%d'
|
||||
register: _date
|
||||
|
||||
- name: Write out requirements file
|
||||
template:
|
||||
src: requirements.txt.j2
|
||||
@ -59,7 +68,8 @@
|
||||
pip:
|
||||
requirements: '/usr/ansible-venv/requirements.txt'
|
||||
virtualenv: '/usr/ansible-venv'
|
||||
# If the requirements.txt has changed, force things to upgrade
|
||||
# Always upgrade because only called in response to
|
||||
# requirements.txt changes.
|
||||
extra_args: '--upgrade'
|
||||
|
||||
# From Ansible 2.10 >= most of the fun stuff is in collections. Clone
|
||||
|
@ -1,3 +1,4 @@
|
||||
# Update timestamp: {{ _date.stdout }}
|
||||
{% for r in install_ansible_requirements %}
|
||||
{{ r }}
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user