system-config/playbooks/roles/afsmon/tasks/main.yaml
Ian Wienand 301514286b afsmon: install python3-pip
Production servers don't have pip installed by default; this is hidden
by gate testing because nodepool nodes do.  Install it for afsmon.

Change-Id: If18ce8c7afb6899f2b6628852e716e63808fc403
2020-02-12 16:39:11 +11:00

42 lines
810 B
YAML

- name: Ensure afsmon log directory
file:
path: '/var/log/afsmon'
state: directory
owner: root
group: root
mode: 0755
- name: Install dependency packages
package:
name:
- python3-pip
- python3-pbr
- python3-statsd
- python3-prettytable
state: present
- name: Install afsmon
pip:
name: afsmon
state: present
executable: pip3
- name: Install configuration file
copy:
src: afsmon.cfg
dest: '/etc/'
mode: '0644'
- name: Install afsmon cron job
cron:
name: 'afsmon'
state: present
job: '/usr/local/bin/afsmon statsd >> /var/log/afsmon/afsmon.log 2>&1'
hour: '*'
minute: '30'
- name: Install logrotate rules
include_role:
name: logrotate
vars:
logrotate_file_name: '/var/log/afsmon/afsmon.log'