Re: [ansible-project] ERROR! Syntax Error while loading YAML. mapping values are not allowed in this context

2019-05-03 Thread Sebastian Meyer
On 03.05.19 11:38, op...@netexpress.de wrote:
>   -name: postfix - set debconf defaults before postfix install

You are missing a space here between the hyphen and name.

Sebastian

-- 
Sebastian Meyer
Linux Consultant & Trainer
Mail: me...@b1-systems.de

B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537

-- 
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/5e43ad07-b7a5-d246-61a6-4acf9aa15d1a%40b1-systems.de.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] ERROR! Syntax Error while loading YAML. mapping values are not allowed in this context

2019-05-03 Thread opitz
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.