Add support for the testing repo to the update_packages playbook
This commit is contained in:
parent
d9ef700395
commit
b52b740104
1 changed files with 11 additions and 7 deletions
|
@ -1,18 +1,22 @@
|
|||
# requires --extra-vars="target='host1;host2;group etc' package='python-tahrir'
|
||||
#
|
||||
# Alternatively, you could update a group of packages like
|
||||
# --extra-vars="package='python-t*'"
|
||||
|
||||
# TODO -- how do make it easy to select the infra-testing repo?
|
||||
# --extra-vars="target='host1;host2' package='python-t*'"
|
||||
#
|
||||
# To update from testing, adjust as follow:
|
||||
# --extra-vars="target='host1;host2' package='python-t*' testing=True"
|
||||
|
||||
- name: push packages out
|
||||
hosts: "{{ target }}"
|
||||
user: root
|
||||
|
||||
vars:
|
||||
testing: False
|
||||
|
||||
tasks:
|
||||
|
||||
- name: expire-caches
|
||||
command: yum clean expire-cache
|
||||
- name: expire-caches {% if testing %}(with infrastructure-testing on){% endif %}
|
||||
command: yum clean expire-cache {% if testing %} --enablerepo=infrastructure-testing {% endif %}
|
||||
|
||||
- name: yum update {{ package }}
|
||||
yum: name={{ package }} state=latest
|
||||
- name: yum update {{ package }} {% if testing %}(with infrastructure-testing on){% endif %}
|
||||
yum: name={{ package }} state=latest # {% if testing %}enablerepo=infrastructure-testing{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue