ansible/roles/mdapi/tasks/main.yml
Michael Scherer cd161cae68 Simplify the task to install cronjob
Giving directly the file to deploy and doing magic with the variable
permit to have a clearer idea of what is deployed when reading the
task for the first time
2016-08-08 16:34:59 +00:00

44 lines
873 B
YAML

---
# Configuration for the mdapi webapp
- name: install needed packages
dnf: pkg={{ item }} state=present
with_items:
- mdapi
- python3-fedmsg-core
- policycoreutils-python-utils
tags:
- mdapi
- packages
- name: create all the directory for the configuration file
file: state=directory path=/etc/mdapi
tags:
- mdapi
- config
- name: Install the meta-data fetch cron job
when: inventory_hostname.startswith(('mdapi01'))
template:
src: "{{ item | basename }}"
dest: "{{ item }}"
with_items:
- /etc/cron.d/mdapi.cron
- /etc/mdapi/mdapi.cfg
tags:
- mdapi
- config
- name: stop apache service
service: name=httpd enabled=no state=stopped
ignore_errors: true
tags:
- mdapi
- service
- name: start the mdapi service
service: name=mdapi enabled=yes state=started
ignore_errors: true
tags:
- mdapi
- service