title: Ansible set_fact doesn't change the variable value
body: <p>Scenario ansible-playbook is called with passed in extra var:</p>
  
  <pre><code>-e my_var=init_value
  </code></pre>
  
  <p>Then in a role code the value is supposed to change via set_fact call (variable other_var value is "new_value"):</p>
  
  <pre><code>set_fact: my_var: {{ other_var }}
  </code></pre>
  
  <p>This results in a nice output supposedly confirming alteration:</p>
  
  <pre><code>{"ansible facts": {"my_var": "new_value"}}
  </code></pre>
  
  <p>However echoing the variable after changing it shows the old value:</p>
  
  <pre><code>echo {{ my_var }}
  -&gt; "echo init_value"
  </code></pre>
  
  <p>To add to that, when I set two variables in the above example:</p>
  
  <pre><code>set_fact: my_var: {{ other_var }}
  set_fact: new_var: {{ other_var }}
  </code></pre>
  
  <p>The new_var is set properly.</p>
  
  <p>Is the variable in some way immutable? How to use the set_fact to update the variable's value?</p>