proper YAML syntax for ansible tasks

parent 8e202d61
......@@ -22,41 +22,46 @@
# ansible-playbook -u my_user -i '192.168.100.10,192,168.100.11,' ./run_role.yml -e "role=munin_node"
#
- name: install OS packages
apt: >
- name: Install OS packages
apt:
pkg={{ item }}
state=present
update_cache=yes
name: "{{ item }}"
state: present
update_cache: yes
with_items: "{{ munin_node_debian_pkgs }}"
tags:
- install
- install:system-requirements
with_items: munin_node_debian_pkgs
# Enable optional plugins for io metrics
- name: link munin-node iostat
file: >
src="/usr/share/munin/plugins/iostat"
dest="/etc/munin/plugins/iostat"
state="link" owner=root group=root
# Enable optional plugins for io metrics
- name: Link munin-node iostat
file:
src: "/usr/share/munin/plugins/iostat"
dest: "/etc/munin/plugins/iostat"
state: link
owner: root
group: root
tags:
- install
- install:configuration
- name: link munin-node iostat-ios
file: >
src="/usr/share/munin/plugins/iostat_ios"
dest="/etc/munin/plugins/iostat_ios"
state="link" owner=root group=root
- name: Link munin-node iostat-ios
file:
src: "/usr/share/munin/plugins/iostat_ios"
dest: "/etc/munin/plugins/iostat_ios"
state: link
owner: root
group: root
tags:
- install
- install:configuration
- name: copy munin iostat config
copy: >
src="munin-edx"
dest="/etc/munin/plugin-conf.d/munin-edx"
owner=root group=root mode="644"
- name: Copy munin iostat config
copy:
src: "munin-edx"
dest: "/etc/munin/plugin-conf.d/munin-edx"
owner: root
group: root
mode: "0644"
tags:
- install
- install:configuration
......@@ -64,19 +69,19 @@
# Assumes a single allow line
# Requires libnet-cidr-perl included in the pkgs installed
# above
- name: add source cidr
- name: Add source cidr
lineinfile:
dest=/etc/munin/munin-node.conf
regexp='^cidr_allow'
line='cidr_allow {{ MUNIN_MONITOR_CIDR }}'
dest: /etc/munin/munin-node.conf
regexp: '^cidr_allow'
line: 'cidr_allow {{ MUNIN_MONITOR_CIDR }}'
tags:
- install
- install:configuration
- name: restart munin-mode
service: >
name=munin-node
state=restarted
- name: Restart munin-mode
service:
name: munin-node
state: restarted
tags:
- install
- install:configuration
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment