ansible thinks /etc/ansible/host_vars/localhost format is json

Bug #1318036 reported by Patrick Hetu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
High
Unassigned

Bug Description

Charms that use ansible give this error:

2014-05-09 19:08:00 INFO install fatal: [localhost] => /etc/ansible/host_vars/localhost: Expecting property name: line 1 column 1 (char 1)

As with Ansible version 1.6, Ansible add support for json for his configuration files.
So if a file begin with { or [ it interprets it as json. The problem is that yaml sometimes
also starts with {

The solution is to use the default_flow_style=False option with the yaml.dump function to remove the parentesis.

Related branches

Changed in charm-helpers:
status: New → Fix Committed
importance: Undecided → High
Changed in charm-helpers:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.