mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-16 13:56:03 +08:00
24 lines
819 B
YAML
24 lines
819 B
YAML
# requires --extra-vars="target='host1;host2;group etc' package='python-tahrir'"
|
|
#
|
|
# Alternatively, you could update a group of packages like
|
|
# --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: clean all metadata {% if testing %}(with infrastructure-testing on){% endif %}
|
|
command: yum clean all {% if testing %} --enablerepo=infrastructure-testing {% endif %}
|
|
always_run: yes
|
|
|
|
- name: yum update {{ package }} {% if testing %}(with infrastructure-testing on){% endif %}
|
|
yum: name={{ package }} state=latest {% if testing %}enablerepo=infrastructure-testing{% endif %}
|