Closed toanant closed 5 years ago
What is the version of ansible you are using?
ansible 2.2.1.0 Vagrant 2.0.2 Linux kernel - 4.15.0-041500-generic
Can you update the ansible to version 2.4.x and see if you are still getting the issue?
ansible --version ansible 2.4.3.0
@theskumar still getting same error with updated ansible.
same issue with me yesterday @toanant , try with sudo user in the ansible provisioner/roles/project_data/tasks/main.yml line 8 set become: yes
The setup only works perfectly with ansible version: ansible==2.5.0
Other lower versions are posing a problem because of the considerable amount of changes.
Please ensure that you have got that version (double check if system version is different from the version in virtualenv) and it should work.
TASK [project_data : debug] ****
FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'dict object' has no attribute 'before'\n\nThe error appears to have been in '/home/user/provisioner/roles/project_data/tasks/main.yml': line 13, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- debug: msg='SHA-1 before git update is \"{{ gitresult.before }}\"'\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}