mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-27 03:52:09 +08:00
44 lines
936 B
YAML
44 lines
936 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.file }}
|
|
dest={{ item.location }}/{{ item.file }}
|
|
with_items:
|
|
- { file: 'mdapi.cron', location: /etc/cron.d }
|
|
- { file: 'mdapi.cfg', location: /etc/mdapi }
|
|
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
|