On 09.08.2018 20:08, Henrik Schuetze wrote:
- name: modify it
replace:
path: "{{ mysql_conf_dir }}/my.cnf"
regexp: 'server-id = 7'
replace: 'server-id = {{ hostvars.host_id }}'
i got:
[WARNING]: While constructing a mapping from
/mnt/c/svn/SystemsEngineering/Ansible/UBS-OST/roles/maria_cluster/tasks/main.yml,
line 15, column 3, found a duplicate dict key (replace). Using last
defined
value
only.
[WARNING]: Ignoring invalid attribute: path
[WARNING]: Ignoring invalid attribute: regexp
Your indentation is wrong, path, regexp and the second replace is a
property of replace not the task so you are missing 2 spaces on those
lines.
In YAML indentation is crucial because it has meaning.
Look at the examples in the documentation and pay attention to the
indentation.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/38add4cde874c2bb12cfd568739bdcc4%40olstad.com.
For more options, visit https://groups.google.com/d/optout.