ansistrano / deploy

Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
https://ansistrano.com
MIT License
2.37k stars 343 forks source link

Cannot use the --check option of ansible-playbook CLI #320

Closed jycamier closed 3 years ago

jycamier commented 5 years ago

Hi,

I cannot use the --check option of ansible-playbook. There a strange behavior at the moment to register the ansible_release_path

TASK [ansistrano.deploy : ANSISTRANO | GIT | Create release folder] ************
fatal: [akeneo]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/var/jenkins_home/workspace/allopneus-pim-akeneo-build-staging@2/ansistrano/roles/ansistrano.deploy/tasks/update-code/git.yml': line 57, 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- name: ANSISTRANO | GIT | Create release folder\n  ^ here\n"}
dzschille commented 5 years ago

I thought i had a bug in my config and were looking for it far too long. I had the same behavior:

ansible-playbook -i ./etc/ansible/preview ./etc/deploy/deploy.yaml --check
...
TASK [ansistrano.deploy : ANSISTRANO | RSYNC | Rsync application files to remote shared copy]
fatal: [my_app]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/home/user/.ansible/roles/ansistrano.deploy/tasks/update-code/rsync.yml': line 6, 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- name: ANSISTRANO | RSYNC | Rsync application files to remote shared copy\n  ^ here\n"}
ricardclau commented 3 years ago

Sorry about this long running issue, I think it may get solved by the changes at https://github.com/ansistrano/deploy/commit/7864dc52a43258ce375f415bd8a87c4f8367de1e

This was introduced in Ansible 2.2 which we deprecated ages ago so it should be safe

If someone can please confirm that would be helpful!