Skip to content

Instantly share code, notes, and snippets.

@xakrume
Created March 2, 2018 14:08
Show Gist options
  • Save xakrume/79923517d24c1e54ed4ee4bafc62ab4a to your computer and use it in GitHub Desktop.
Save xakrume/79923517d24c1e54ed4ee4bafc62ab4a to your computer and use it in GitHub Desktop.
fatal: [example.eu]: 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 '/Users/default/Documents/repoitories/ansible/roles/mytask/tasks/main.yml': line 27, 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- local_action: copy content=\"{{ command_result.stdout }}\" dest=/tmp/test\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\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'stdout'"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment