yaegashi / ansible-role-blockinfile

Ansible role which contains blockinfile module
97 stars 18 forks source link

Module doesn't work with PARAMETER= #9

Closed pgdagenais closed 4 years ago

pgdagenais commented 8 years ago
- name: Add server as client
  blockinfile:
    dest: /etc/munin/munin.conf
    state: present
    marker: "#{mark} ANSIBLE MANAGED BLOCK"
    block: |
      [{{ ansible_hostname }}]
          address {{ ansible_eth1.ipv4.address }}
          use_node_name yes

This code work.

but when I try to use = instead of : it doesn't work anymore.

- name: Add server as client
  blockinfile: >
    dest=/etc/munin/munin.conf
    state=present
    marker="#{mark} ANSIBLE MANAGED BLOCK"
    block= |
      "[{{ ansible_hostname }}]
        address {{ ansible_eth1.ipv4.address }}
        use_node_name yes"

I get this error : msg: this module requires key=value arguments (['dest=/etc/munin/munin.conf', 'state=present', 'marker=#{mark} ANSIBLE MANAGED BLOCK', 'block=', '|', '[monitoring-server]\naddress 192.168.35.17\nuse_node_name yes'])

iliv commented 8 years ago

@yaegashi did you abandon this project?