Re: Ansible Playbook fails with syntax error

22 views
Skip to first unread message
Message has been deleted

Tony Esposito

unread,
Oct 23, 2018, 5:08:32 PM10/23/18
to Ansible Project
It was determined that this playbook that was failing was not even being used by Ansible.  It was a 'test' playbook so I am going to 'pass' on even answering this one.


On Thursday, October 18, 2018 at 12:57:14 PM UTC-5, Tony Esposito wrote:
Hello,

  I am new to Ansible and would like some feedback, please.  I am running Ansible 2.5.0 and using AWX.

  Having some issues running this playbook.

- hosts: "{{ target1 }}"
  gather_facts: false
  become: true
  become_user: webuser
  roles:
    - r10web/git_pull

- hosts: "{{ target1 }}"
  gather_facts: false
  become: true
  roles:
    - r10web/perms

- hosts: "{{ target2 }}"
  gather_facts: true
  become: true
  serial: 1
  vars_files: #Below is for load balancer healthcheck before removing locks.
    - "group_vars/kemplb" #Contains kemplb.ip kemplb.user kemplb.pass. Requires vault password.
  roles:
    - r10web/cf_restart_locking

  Getting these errors (while running the playbook via AWX):

ERROR! Syntax Error while loading YAML.

The error appears to have been in '/var/lib/awx/projects/_10__r10ansible/roles/r10web/git_pull/tasks/main.yml': line 3, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

command: "git pull"
chdir: /r10web/www.region10.org
^ here

exception type: <class 'yaml.parser.ParserError'>
exception: while parsing a block mapping
in "<unicode string>", line 1, column 3
did not find expected key
in "<unicode string>", line 3, column 5


Contents of file /var/lib/awx/projects/_10__r10ansible/roles/r10web/git_pull/tasks/main.yml are as follows:

- name: git pull command: "git pull" chdir: /r10web/www.region10.org

Any help would be greatly appreciated...
Thx.

Reply all
Reply to author
Forward
0 new messages