fedimg: Compress the multiple tasks into one
Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
This commit is contained in:
parent
e43c8b50d1
commit
1b286043bf
1 changed files with 11 additions and 49 deletions
|
@ -1,12 +1,10 @@
|
||||||
- name: push packages out
|
- name: push packages out
|
||||||
hosts: fedimg:fedimg-stg
|
hosts: fedimg:fedimg-stg
|
||||||
user: root
|
user: root
|
||||||
vars_files:
|
vars_files:
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
- /srv/web/infra/ansible/vars/global.yml
|
||||||
- "/srv/private/ansible/vars.yml"
|
- "/srv/private/ansible/vars.yml"
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||||
vars:
|
|
||||||
testing: False
|
|
||||||
handlers:
|
handlers:
|
||||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
||||||
|
|
||||||
|
@ -15,53 +13,17 @@
|
||||||
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
|
command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
|
||||||
check_mode: no
|
check_mode: no
|
||||||
- name: yum update fedimg packages from main repo
|
- name: yum update fedimg packages from main repo
|
||||||
yum: name="python-fedimg" state=latest
|
yum: name"{{ item }}" state=latest
|
||||||
when: not testing
|
with_items:
|
||||||
|
- python-fedimg
|
||||||
|
- python2-libcloud
|
||||||
|
- python2-fedfind
|
||||||
- name: yum update fedimg packages from testing repo
|
- name: yum update fedimg packages from testing repo
|
||||||
yum: name="python-fedimg" state=latest enablerepo=infrastructure-tags-stg
|
yum: name="{{ item }}" state=latest enablerepo=infrastructure-tags-stg
|
||||||
when: testing
|
with_items:
|
||||||
- name: yum update libcloud from testing repo
|
- python-fedimg
|
||||||
yum: name="python2-libcloud" state=latest enablerepo=epel-testing
|
- python2-libcloud
|
||||||
when: not testing
|
- python2-fedfind
|
||||||
|
|
||||||
- name: update fedfind
|
|
||||||
hosts: fedimg:fedimg-stg
|
|
||||||
user: root
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
||||||
vars:
|
|
||||||
testing: False
|
|
||||||
handlers:
|
|
||||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: yum update fedfind packages from main repo
|
|
||||||
yum: name="fedfind" state=latest
|
|
||||||
when: not testing
|
|
||||||
- name: yum update fedfind packages from testing repo
|
|
||||||
yum: name="fedfind" state=latest enablerepo=infrastructure-tags-stg
|
|
||||||
when: testing
|
|
||||||
|
|
||||||
- name: update python2-fedfind
|
|
||||||
hosts: fedimg:fedimg-stg
|
|
||||||
user: root
|
|
||||||
vars_files:
|
|
||||||
- /srv/web/infra/ansible/vars/global.yml
|
|
||||||
- "/srv/private/ansible/vars.yml"
|
|
||||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
||||||
vars:
|
|
||||||
testing: False
|
|
||||||
handlers:
|
|
||||||
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
||||||
|
|
||||||
tasks:
|
|
||||||
- name: yum update fedfind packages from main repo
|
|
||||||
yum: name="python2-fedfind" state=latest
|
|
||||||
when: not testing
|
|
||||||
- name: yum update fedfind packages from testing repo
|
|
||||||
yum: name="python2-fedfind" state=latest enablerepo=infrastructure-tags-stg
|
|
||||||
when: testing
|
when: testing
|
||||||
|
|
||||||
- name: verify the backend and restart it
|
- name: verify the backend and restart it
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue