From cac003cb038b391cc56c18f122eef8237aa61631 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mon, 9 Nov 2015 15:47:52 +0100 Subject: [PATCH] First work on the mdapi role --- roles/mdapi/tasks/main.yml | 21 +++++++++++++++++++++ roles/mdapi/templates/mdapi.cron | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 roles/mdapi/tasks/main.yml create mode 100644 roles/mdapi/templates/mdapi.cron 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 +