I have the following playbook:
---
- hosts: debian
order: sorted
tasks:
-name: postfix - set debconf defaults before postfix install
shell: debconf-set-selections <<< "postfix postfix/mailname string {{
inventory_hostname }}" executable=/bin/bash
tags: postfix
But i get the error:
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in '/opt/ansible/playbooks/postfix.yml':
line 6, column 12, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
-name: postfix - set debconf defaults before postfix install
shell: debconf-set-selections <<< "postfix postfix/mailname string {{
inventory_hostname }}" executable=/bin/bash
^ here
We could be wrong, but this one looks like it might be an issue with
missing quotes. Always quote template expression brackets when they
start a value. For instance:
with_items:
- {{ foo }}
Should be written as:
with_items:
- "{{ foo }}"
Help, please! What am i doing wrong?
--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/ddc4e384-25b2-4180-bcd9-a5fc18501e59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.