<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Feature Idea</p>
<h5 dir="auto">Component Name:</h5>
<p dir="auto">core</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">$ ansible --version<br>
ansible 2.0.0.2<br>
config file = /home/damjan/sys-ops/ansible.cfg<br>
configured module search path = Default w/o overrides</p>
<h5 dir="auto">Ansible Configuration:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ask_vault_pass   =  true
become           = true"><pre class="notranslate"><code class="notranslate">ask_vault_pass   =  true
become           = true
</code></pre></div>
<h5 dir="auto">Summary:</h5>
<p dir="auto">the ansible.cfg file has <code class="notranslate">become=true</code> and <code class="notranslate">ask_vault_pass=true</code> but in rare situations I need to run <code class="notranslate">ansible</code> without the vault or sudo requirements. It would need to have something like <code class="notranslate">--no-become</code> and <code class="notranslate">--no-ask-vault-pass</code> or <code class="notranslate">--become=false</code> to be able to revert the defaults from the config file.</p>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Bug Report</li>
<li>Feature Idea</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">lib/ansible/playbook/play_context.py<br>
lib/ansible/playbook/become.py</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="devel"><pre class="notranslate"><code class="notranslate">devel
</code></pre></div>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">PlayContext defined its own become attributes: <a href="https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/play_context.py#L194">https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/play_context.py#L194</a></p>
<p dir="auto">but we have a Become mixin which does that: <a href="https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/become.py#L33">https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/become.py#L33</a></p>
<p dir="auto">Is there a reason for this or should we switch PlayContext to use the mixin?</p>
<p dir="auto">Note: the answer could be that play_context is actually not like the other objects in playbook/ at all.  (In which case... we should probably be moving to separate it more rather than integrating it tighter with an abstraction that's an imperfect fit.)</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">Look at  play_context.py and become.py to see that they're defining the same attributes but not</p>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">No code duplication; logical structure</p>
<h5 dir="auto">ACTUAL RESULTS</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>