Actions
Bug #23144
closedbad indentation in rendered ansible playbook causes syntax error
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Description
Running an ansible playbook against a host fails with:
ERROR! Syntax Error while loading YAML. The error appears to have been in '/tmp/foreman-playbook-18a12c57-3a1d-47eb-9ed2-788a6c997c90.yml': line 7, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - disable_firewall - robottelo ^ here exception type: <class 'yaml.parser.ParserError'> exception: while parsing a block mapping in "<unicode string>", line 2, column 3 did not find expected key in "<unicode string>", line 7, column 5 Exit status: 4
The rendered playbook looks as follows:
--- - hosts: test.example.com tasks: - debug: msg=These are the parameters "{{ foreman_params }}" roles: - disable_firewall - robottelo
The easiest way to see this is to import roles, add them to a host and then preview the Ansible Roles - Ansible Default template in Hosts > Job templates
Packages:
tfm-rubygem-foreman_ansible-2.0.1-1.fm1_18.el7.noarch
ansible-2.4.2.0-1.el7.noarch
rubygem-smart_proxy_ansible-2.0.2-2.fm1_18.el7.noarch
tfm-rubygem-foreman_ansible_core-2.0.2-1.fm1_18.el7.noarch
foreman-1.18.0-0.develop.201803291734git682269f.el7.noarch
Updated by Sebastian Gräßl about 6 years ago
- Status changed from New to Resolved
The issue has been resolved with
fb08a6416152181144060d26b0ad341099c0d3f2 and released with foreman-ansible 2.1.0.
Actions