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"
^ 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:
Any help would be greatly appreciated...
Thx.