ansible-role-blockinfile
ansible-role-blockinfile copied to clipboard
Please add install instructions to README.md
I want to use this module, but don't know how to install this at all.
I get an (expected) error when using homebrew'd ansible, b/c I didn't install this yet (and don't know how).
ERROR: blockinfile is not a legal parameter in an Ansible task or handler
Install the module with ansible galaxy with this command :
ansible-galaxy install yaegashi.blockinfile
and then add something like this in your playbook :
roles:
- yaegashi.blockinfile
- apache
- munin
and then something like this in your tasks:
- 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 did it, and my playbook doesnt work..
- hosts: local
user: root
roles:
- yaegashi.blockinfile
tasks:
- name: prueba
blockinfile:
dest: /etc/hosts
block: |
pruebaaaa
And the output is:
ERROR: is not a legal parameter in an Ansible task or handler
The role is installed, but i dont know whats happen :S
ectorr see #15