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'
|
# requires --extra-vars="target='host1;host2;group etc' package='python-tahrir'
|
||||||
#
|
#
|
||||||
# Alternatively, you could update a group of packages like
|
# Alternatively, you could update a group of packages like
|
||||||
# --extra-vars="package='python-t*'"
|
# --extra-vars="target='host1;host2' package='python-t*'"
|
||||||
|
#
|
||||||
# TODO -- how do make it easy to select the infra-testing repo?
|
# To update from testing, adjust as follow:
|
||||||
|
# --extra-vars="target='host1;host2' package='python-t*' testing=True"
|
||||||
|
|
||||||
- name: push packages out
|
- name: push packages out
|
||||||
hosts: "{{ target }}"
|
hosts: "{{ target }}"
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
|
vars:
|
||||||
|
testing: False
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- name: expire-caches
|
- name: expire-caches {% if testing %}(with infrastructure-testing on){% endif %}
|
||||||
command: yum clean expire-cache
|
command: yum clean expire-cache {% if testing %} --enablerepo=infrastructure-testing {% endif %}
|
||||||
|
|
||||||
- name: yum update {{ package }}
|
- name: yum update {{ package }} {% if testing %}(with infrastructure-testing on){% endif %}
|
||||||
yum: name={{ package }} state=latest
|
yum: name={{ package }} state=latest # {% if testing %}enablerepo=infrastructure-testing{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue