<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">ansible 1.6.7</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">Red Hat Enterprise Linux Server release 6.5 (Santiago)</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">When using the lvg module, if vg_options is not provided then Ansible will crash with a traceback.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">Play:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create the data LVM VG
  lvg: vg=data pvs=/dev/xvda2 pesize=32"><pre class="notranslate"><code class="notranslate">- name: Create the data LVM VG
  lvg: vg=data pvs=/dev/xvda2 pesize=32
</code></pre></div>
<p dir="auto">Traceback:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK: [partitioning | Create the data LVM VG] *********************************
failed: [testwebpost21] =&gt; {&quot;failed&quot;: true, &quot;parsed&quot;: false}
invalid output was: SUDO-SUCCESS-ieypxlylttyivekkfyplwlhjtktktnub
Traceback (most recent call last):
  File &quot;/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg&quot;, line 1460, in &lt;module&gt;
    main()
  File &quot;/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg&quot;, line 119, in main
    vgoptions = module.params.get('vg_options', '').split()
AttributeError: 'NoneType' object has no attribute 'split'"><pre class="notranslate"><code class="notranslate">TASK: [partitioning | Create the data LVM VG] *********************************
failed: [testwebpost21] =&gt; {"failed": true, "parsed": false}
invalid output was: SUDO-SUCCESS-ieypxlylttyivekkfyplwlhjtktktnub
Traceback (most recent call last):
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg", line 1460, in &lt;module&gt;
    main()
  File "/home/ec2-user/.ansible/tmp/ansible-tmp-1406270471.12-134934980308379/lvg", line 119, in main
    vgoptions = module.params.get('vg_options', '').split()
AttributeError: 'NoneType' object has no attribute 'split'
</code></pre></div>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">I expect this play to work.<br>
I expect not to have to provide the vg_options arg, since it is documented as optional (and appears to be optional in the source code too)</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Ansible crashes with a traceback - as above in the "Steps To Reproduce" section.</p>
<h5 dir="auto">Known workaround:</h5>
<p dir="auto">Provide vg_options as an empty string, for example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="- name: Create the data LVM VG
  lvg: vg=data pvs=/dev/xvda2 pesize=32 vg_options=&quot;&quot;"><pre class="notranslate"><code class="notranslate">- name: Create the data LVM VG
  lvg: vg=data pvs=/dev/xvda2 pesize=32 vg_options=""
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h4 dir="auto">Problem Still reproducible after ansible upgrade ( duplicate from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="136687524" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/14677" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/14677/hovercard" href="https://github.com/ansible/ansible/issues/14677">#14677</a>)</h4>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.2.0 (devel c9a5b1c555) last updated 2016/06/02 15:42:56 (GMT +200)
  lib/ansible/modules/core: (detached HEAD ca4365b644) last updated 2016/06/02 15:43:14 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD b0aec50b9a) last updated 2016/06/02 15:43:15 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

Python 2.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2

Ansible Configuration:
 ansible_ssh_user: xxxx
 ansible_ssh_pass: xxxxx
 ansible_connection: winrm
 ansible_ssh_port: 5985"><pre class="notranslate"><code class="notranslate">ansible 2.2.0 (devel c9a5b1c555) last updated 2016/06/02 15:42:56 (GMT +200)
  lib/ansible/modules/core: (detached HEAD ca4365b644) last updated 2016/06/02 15:43:14 (GMT +200)
  lib/ansible/modules/extras: (detached HEAD b0aec50b9a) last updated 2016/06/02 15:43:15 (GMT +200)
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides

Python 2.7.5 (default, Oct 11 2015, 17:47:16)
[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2

Ansible Configuration:
 ansible_ssh_user: xxxx
 ansible_ssh_pass: xxxxx
 ansible_connection: winrm
 ansible_ssh_port: 5985
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">Ansible running in RHEL 7.2<br>
OS remote is Windows 2008R2 with powershell 4.0</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">When delegating an action for a windows host to a linux host I get this error:<br>
FAILED! =&gt; {"failed": true, "msg": "ssl: 500 WinRMTransport. [Errno 111] Connection refused"}</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Try delegating an action from a windows host to a linux host:
file: main.yml
 - name: 01-EsperarTermineReinicioServidor
   wait_for: port=3389 host=&quot;192.168.1.10&quot; delay=10 timeout=600 state=started
   delegate_to: 127.0.0.1"><pre class="notranslate"><code class="notranslate">Try delegating an action from a windows host to a linux host:
file: main.yml
 - name: 01-EsperarTermineReinicioServidor
   wait_for: port=3389 host="192.168.1.10" delay=10 timeout=600 state=started
   delegate_to: 127.0.0.1
</code></pre></div>

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

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


<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FAILED! =&gt; {&quot;failed&quot;: true, &quot;msg&quot;: &quot;ssl: 500 WinRMTransport. [Errno 111] Connection refused&quot;}
"><pre class="notranslate"><code class="notranslate">FAILED! =&gt; {"failed": true, "msg": "ssl: 500 WinRMTransport. [Errno 111] Connection refused"}

</code></pre></div>