diff options
Diffstat (limited to 'lamp_haproxy/aws/roles/nagios/tasks/main.yml')
-rw-r--r-- | lamp_haproxy/aws/roles/nagios/tasks/main.yml | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/lamp_haproxy/aws/roles/nagios/tasks/main.yml b/lamp_haproxy/aws/roles/nagios/tasks/main.yml index 69e2d43..601fcc7 100644 --- a/lamp_haproxy/aws/roles/nagios/tasks/main.yml +++ b/lamp_haproxy/aws/roles/nagios/tasks/main.yml @@ -2,7 +2,9 @@ # This will install nagios - name: install nagios - yum: pkg={{ item }} state=present + yum: + pkg: "{{ item }}" + state: present with_items: - nagios - nagios-plugins @@ -15,22 +17,31 @@ notify: restart httpd - name: create nagios config dir - file: path=/etc/nagios/ansible-managed state=directory + file: + path: /etc/nagios/ansible-managed + state: directory - name: configure nagios - copy: src=nagios.cfg dest=/etc/nagios/nagios.cfg + copy: + src: nagios.cfg + dest: /etc/nagios/nagios.cfg notify: restart nagios - name: configure localhost monitoring - copy: src=localhost.cfg dest=/etc/nagios/objects/localhost.cfg + copy: + src: localhost.cfg + dest: /etc/nagios/objects/localhost.cfg notify: restart nagios - name: configure nagios services - copy: src=ansible-managed-services.cfg dest=/etc/nagios/ + copy: + src: ansible-managed-services.cfg + dest: /etc/nagios/ - name: create the nagios object files - template: src={{ item + ".j2" }} - dest=/etc/nagios/ansible-managed/{{ item }} + template: + src: "{{ item + .j2 }}" + dest: "/etc/nagios/ansible-managed/{{ item }}" with_items: - webservers.cfg - dbservers.cfg |