ningyougang commented on issue #2556: Fix bug on set_fact relative ansible task
URL: 
https://github.com/apache/incubator-openwhisk/pull/2556#issuecomment-319567846
 
 
   I write a simple ansible yml to test
   ```
   - name: "just test the set_fact"
     set_fact:
       var1: "a"
       var2: "{{ var1 }}"
   ```
   The error is same as above
   
   fatal: [172.17.0.1]: FAILED! => {"failed": true, "msg": "the field 'args' 
has an invalid value, which appears to include a variable that is undefined. 
The error was: 'var1' is undefined\n\nThe error appears to have been in 
'/home/irteam/jenkins/workspace/lambda/ansible/roles/couchdb/tasks/deploy.yml': 
line 20, 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: \"just test 
the set_fact\"\n  ^ here\n"}
   
   if changed as below, worked well.
   ```
   - name: "just test the set_fact"
     vars:
       var1: "a"
     set_fact:
       var2: "{{ var1 }}"
   ```
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to