Fueled / django-init

Project template used at Fueled for scaffolding new Django based projects. :dizzy:
Other
189 stars 46 forks source link

Vagrant provision throwing error for git sha-1 debug #297

Closed toanant closed 5 years ago

toanant commented 6 years ago

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"}

theskumar commented 6 years ago

What is the version of ansible you are using?

toanant commented 6 years ago

ansible 2.2.1.0 Vagrant 2.0.2 Linux kernel - 4.15.0-041500-generic

theskumar commented 6 years ago

Can you update the ansible to version 2.4.x and see if you are still getting the issue?

toanant commented 6 years ago

ansible --version ansible 2.4.3.0

@theskumar still getting same error with updated ansible.

ShubhamBansal1997 commented 6 years ago

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

CuriousLearner commented 5 years ago

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.