summaryrefslogtreecommitdiffstats
path: root/roles/ands_monitor/tasks/main.yml
blob: 8cac4ea218c31a6ce350527593633883ab6af501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- name: Install monitoring applications
  package: name={{item}} state=present
  with_items: 
    - sysstat

- name: Create scripts directory
  file: path="{{ ands_script_path }}" state=directory

- name: "Deploy scripts"
  template: src="{{ item | quote }}" dest="{{ ands_script_path }}/{{ script_name }}" owner=root group=root mode=0755
  vars:
    script_name: "{{ item | basename | regex_replace('\\.j2','') }}"
  with_fileglob:
    - "{{ role_path }}/templates/scripts/*.j2"


- name: "Deploy cron jobs"
  template: src="{{ item | quote }}" dest="/etc/cron.d/{{ cron_name }}" owner=root group=root mode=0644
  vars:
    cron_name: "{{ item | basename | regex_replace('\\.j2','') }}"
  with_fileglob:
    - "{{ role_path }}/templates/cron/*.j2"