diff --git a/roles/mdapi/tasks/main.yml b/roles/mdapi/tasks/main.yml new file mode 100644 index 0000000000..62d32857ff --- /dev/null +++ b/roles/mdapi/tasks/main.yml @@ -0,0 +1,21 @@ +--- +# Configuration for the mdapi webapp + +- name: install needed packages + yum: pkg={{ item }} state=present + with_items: + - mdapi + tags: + - mdapi + - packages + +- name: Install the meta-data fetch cron job + when: inventory_hostname.startswith(('mdapi01')) + template: src={{ item.file }} + dest={{ item.location }}/{{ item.file }} + with_items: + - { file: 'mdapi.cron', location: /etc/cron.d } + tags: + - mdapi + - config + diff --git a/roles/mdapi/templates/mdapi.cron b/roles/mdapi/templates/mdapi.cron new file mode 100644 index 0000000000..7ab2caf948 --- /dev/null +++ b/roles/mdapi/templates/mdapi.cron @@ -0,0 +1,4 @@ +# Fetches repo metadata for mdapi +# +*/20 * * * * root /usr/bin/mdapi-get_repo_md +