New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VARIABLE IS NOT DEFINED from referenced variable with value #19135
Comments
This is not a bug, it happens because "awslogs-group" variable has a dash in the name which ansible will not handle (see e.g. #3907) If you do have jq installed, you can use it to get the value with a task like this:
|
Hi, what is jq? |
@bamb00 I updated it with a link, it's a JSON processor that will help to process the output from the task |
I wonder if I can use awk or sed to retrieve the awslogs-group instead of jq. |
@bamb00 you can use whatever tool you like |
ISSUE TYPE: Bug Report
COMPONENT NAME: Referencing from ecs_taskdefinition module
ANSIBLE VERSION: 2.1.1.0
CONFIGURATION: Nothing special
OS / ENVIRONMENT: Nothing special
SUMMARY: task_output result from a debug statement,
STEPS TO REPRODUCE:
"- debug: var=task_output.taskdefinition.containerDefinitions[0].logConfiguration.options.awslogs-group"
EXPECTED RESULTS:
ContainerLogsGroup
ACTUAL RESULTS:
task_output.taskdefinition.containerDefinitions[0].logConfiguration.options.awslogs-group: "VARIABLE IS NOT DEFINED!"
NOTE:
The reference seems to be ok up to 'options',
ok: [localhost] => {
"task_output.taskdefinition.containerDefinitions[0].logConfiguration.options": {
"awslogs-group": "ContainerLogsGroup",
"awslogs-region": "xx-xxxx-x",
"awslogs-stream-prefix": "xxxx-webframework"
}
}
The text was updated successfully, but these errors were encountered: