<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">1.5.5</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">CentOS 5.9</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">We are using Ansible to run puppet agent, which by default (and very helpfully) uses colors to indicate severity of logs.  When puppet is run with default (color=on) settings, there is no output from Ansible; when it is run with ("--color=false") then ansible displays the output.  We would like to have puppet colors preserved since they are of value to spotting issues.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Run the "puppet agent -t" (or other puppet apply command) on a system using Ansible.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@localhost ~]# ansible server.example.com -m shell -a 'puppet agent -t --noop' -v"><pre class="notranslate"><code class="notranslate">[root@localhost ~]# ansible server.example.com -m shell -a 'puppet agent -t --noop' -v
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Expected to see something like below (but with ANSI colors):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@localhost ~]# ansible  server.example.com -m shell -a 'puppet agent -t --noop' -v
server.example.com | success | rc=0 &gt;&gt;
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Caching catalog for server.example.com
info: Applying configuration version '1400866037'
notice: Finished catalog run in 8.13 seconds

[root@localhost ~]#"><pre class="notranslate"><code class="notranslate">[root@localhost ~]# ansible  server.example.com -m shell -a 'puppet agent -t --noop' -v
server.example.com | success | rc=0 &gt;&gt;
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Caching catalog for server.example.com
info: Applying configuration version '1400866037'
notice: Finished catalog run in 8.13 seconds

[root@localhost ~]#
</code></pre></div>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">E.g.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[root@localhost ~]# ansible server.example.com -m shell -a 'puppet agent -t --noop' -v
server.example.com | success | rc=0 &gt;&gt;

[root@localhost ~]#"><pre class="notranslate"><code class="notranslate">[root@localhost ~]# ansible server.example.com -m shell -a 'puppet agent -t --noop' -v
server.example.com | success | rc=0 &gt;&gt;

[root@localhost ~]#
</code></pre></div>
<p dir="auto">错误信息：fatal: [globalmonitor1]: FAILED! =&gt; {"failed": true, "msg": "Timeout (12s) waiting for privilege escalation prompt: "}</p>
<p dir="auto">ansible 2.1.0.0</p>
<p dir="auto">Red Hat Enterprise Linux Server release 7.2 (Maipo)</p>