imagefactory-client: use 'when' on a role
This commit is contained in:
parent
acd9ef280f
commit
995ba8abe7
2 changed files with 1 additions and 7 deletions
|
@ -61,7 +61,7 @@
|
|||
|
||||
roles:
|
||||
- { role: taskotron/taskotron-client, tags: ['taskotronclient'] }
|
||||
- { role: taskotron/imagefactory-client, tags: ['imagefactoryclient'] }
|
||||
- { role: taskotron/imagefactory-client, tags: ['imagefactoryclient'], when: deployment_type in ['dev'] }
|
||||
- { role: taskotron/buildslave, tags: ['buildslave'] }
|
||||
- { role: taskotron/buildslave-configure, tags: ['buildslaveconfigure'] }
|
||||
|
||||
|
|
|
@ -1,33 +1,27 @@
|
|||
---
|
||||
- name: create directory for git clone
|
||||
file: path=/var/lib/fedoraqa state=directory owner=root group=root mode=1755
|
||||
when: deployment_type in ['dev']
|
||||
|
||||
- name: create directory for configuration
|
||||
file: path=/etc/taskotron_base_images state=directory owner=root group=root mode=0755
|
||||
when: deployment_type in ['dev']
|
||||
|
||||
- name: create directory for disposable clients images
|
||||
file: path={{ imagesdir }} state=directory owner=root group={{ slaves_group }} mode=1755
|
||||
when: deployment_type in ['dev']
|
||||
|
||||
- name: Check out our imagefactory tools
|
||||
git:
|
||||
repo: https://bitbucket.org/fedoraqa/base_images
|
||||
dest: '/var/lib/fedoraqa/base_images'
|
||||
update: yes
|
||||
when: deployment_type in ['dev']
|
||||
|
||||
- name: Generate configuration
|
||||
template: src=config.ini.j2 dest=/etc/taskotron_base_images/config.ini owner=root group=root mode=0644
|
||||
|
||||
- name: Download/update images
|
||||
command: '/var/lib/fedoraqa/base_images/get_latest_image/get_latest_image.py update --get-missing --outdir {{imagesdir}} {{imagesdir}}'
|
||||
when: deployment_type in ['dev']
|
||||
|
||||
- name: Create cronjob to download new images
|
||||
cron:
|
||||
name: "Download new images from ImageFactory"
|
||||
special_time: hourly
|
||||
job: '/var/lib/fedoraqa/base_images/get_latest_image/get_latest_image.py update --get-missing --outdir {{imagesdir}} {{imagesdir}}'
|
||||
when: deployment_type in ['dev']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue