<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
<li>Feature Idea</li>
<li>Documentation Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto">user module</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">I have a playbook to create a local user, but when I ran this playbook for two servers, on is RHEL6, the other is RHEL7, why failed on RHEL7, show me the following:</p>
<p dir="auto"><code class="notranslate">fatal: [rht04]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "usermod: user 'ansible' does not exist\n", "name": "ansible", "rc": 6}</code></p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="- name: Add ansible local user to the server
  user:
  name: ansible
  uid: 600
  comment: &quot;Ansible admin user&quot;
  home: /opt/staff/ansible
  createhome: yes
  state: present"><pre class="notranslate">- <span class="pl-ent">name</span>: <span class="pl-s">Add ansible local user to the server</span>
  <span class="pl-ent">user</span>:
  <span class="pl-ent">name</span>: <span class="pl-s">ansible</span>
  <span class="pl-ent">uid</span>: <span class="pl-c1">600</span>
  <span class="pl-ent">comment</span>: <span class="pl-s"><span class="pl-pds">"</span>Ansible admin user<span class="pl-pds">"</span></span>
  <span class="pl-ent">home</span>: <span class="pl-s">/opt/staff/ansible</span>
  <span class="pl-ent">createhome</span>: <span class="pl-s">yes</span>
  <span class="pl-ent">state</span>: <span class="pl-s">present</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TASK [ansiblelocaluser : Add ansible local user to the server] *****************
ok: [rht02] =&gt; {&quot;append&quot;: false, &quot;changed&quot;: false, &quot;comment&quot;: &quot;Ansible admin user&quot;, &quot;group&quot;: 600, &quot;home&quot;: &quot;/opt/staff/ansible&quot;, &quot;move_home&quot;: false, &quot;name&quot;: &quot;ansible&quot;, &quot;shell&quot;: &quot;/bin/bash&quot;, &quot;state&quot;: &quot;present&quot;, &quot;uid&quot;: 600}
fatal: [rht04]: FAILED! =&gt; {&quot;changed&quot;: false, &quot;failed&quot;: true, &quot;msg&quot;: &quot;usermod: user 'ansible' does not exist\n&quot;, &quot;name&quot;: &quot;ansible&quot;, &quot;rc&quot;: 6}
TASK [ansiblelocaluser : set up authorized_key for ansible local user] *********
ok: [rht02] =&gt; {&quot;changed&quot;: false, &quot;exclusive&quot;: false, &quot;key&quot;: &quot;ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyAACMvkERvxgdrthtuK1gOmj88FV+Hr+gmvlMr13Kv+It+kqXF7KgfTzwD5RuZcABU30Hw+IzTe5D2IQQFx4vGOxfGPGhiadfelktLPXj2KaZSYVlfkEWtJ55VG5sEOKx8tMpMXjOMchggstTFe6+/5zCdSeb+29sAUulWHR+pom/eAmHuwO1PiW23hHWiQULzzDxwWVDnqTLvXC1qtjE4OFjmCnsiKTK7AuuU9mqvhS1bcw20hZ8o3lbkgXk0Sr9prwO39B5H8JjVwVssW2l+CqWs+qwGNOSk4Y1fTkrwAj6ZksWGs4br0+Nnyji+Y/V0NkrhVGZh0ybWkF2XFN9 ansible@ansible01&quot;, &quot;key_options&quot;: null, &quot;keyfile&quot;: &quot;/opt/staff/ansible/.ssh/authorized_keys&quot;, &quot;manage_dir&quot;: true, &quot;path&quot;: null, &quot;state&quot;: &quot;present&quot;, &quot;unique&quot;: false, &quot;user&quot;: &quot;ansible&quot;, &quot;validate_certs&quot;: true}
TASK [ansiblelocaluser : make sure that ansible user are in the Unix_ADM group in /etc/sudoers] ***
ok: [rht02] =&gt; {&quot;backup&quot;: &quot;&quot;, &quot;changed&quot;: false, &quot;msg&quot;: &quot;&quot;}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @configure_ansible_env.retry
PLAY RECAP *********************************************************************
rht02 : ok=5 changed=0 unreachable=0 failed=0 
rht04 : ok=2 changed=1 unreachable=0 failed=1
"><pre class="notranslate"><code class="notranslate">TASK [ansiblelocaluser : Add ansible local user to the server] *****************
ok: [rht02] =&gt; {"append": false, "changed": false, "comment": "Ansible admin user", "group": 600, "home": "/opt/staff/ansible", "move_home": false, "name": "ansible", "shell": "/bin/bash", "state": "present", "uid": 600}
fatal: [rht04]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "usermod: user 'ansible' does not exist\n", "name": "ansible", "rc": 6}
TASK [ansiblelocaluser : set up authorized_key for ansible local user] *********
ok: [rht02] =&gt; {"changed": false, "exclusive": false, "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyAACMvkERvxgdrthtuK1gOmj88FV+Hr+gmvlMr13Kv+It+kqXF7KgfTzwD5RuZcABU30Hw+IzTe5D2IQQFx4vGOxfGPGhiadfelktLPXj2KaZSYVlfkEWtJ55VG5sEOKx8tMpMXjOMchggstTFe6+/5zCdSeb+29sAUulWHR+pom/eAmHuwO1PiW23hHWiQULzzDxwWVDnqTLvXC1qtjE4OFjmCnsiKTK7AuuU9mqvhS1bcw20hZ8o3lbkgXk0Sr9prwO39B5H8JjVwVssW2l+CqWs+qwGNOSk4Y1fTkrwAj6ZksWGs4br0+Nnyji+Y/V0NkrhVGZh0ybWkF2XFN9 ansible@ansible01", "key_options": null, "keyfile": "/opt/staff/ansible/.ssh/authorized_keys", "manage_dir": true, "path": null, "state": "present", "unique": false, "user": "ansible", "validate_certs": true}
TASK [ansiblelocaluser : make sure that ansible user are in the Unix_ADM group in /etc/sudoers] ***
ok: [rht02] =&gt; {"backup": "", "changed": false, "msg": ""}
NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @configure_ansible_env.retry
PLAY RECAP *********************************************************************
rht02 : ok=5 changed=0 unreachable=0 failed=0 
rht04 : ok=2 changed=1 unreachable=0 failed=1

</code></pre></div>
<p dir="auto"><strong>NOTE: AD and Centrify Direct Control as user authentication</strong></p>
<h5 dir="auto">ANSIBLE VERSION</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>
<h5 dir="auto">CONFIGURATION</h5>

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


<h5 dir="auto">STEPS TO REPRODUCE</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>

<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=""><pre class="notranslate"><code class="notranslate">
</code></pre></div>
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">Bug Report</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">master</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">If a role dependency is skipped, via:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
---
dependencies:
  - { role: foo, when: false }"><pre class="notranslate">---
<span class="pl-ent">dependencies</span>:
  - <span class="pl-s">{ role: foo, when: false }</span></pre></div>
<p dir="auto">Then it's children are also skipped, even if they are required by other roles.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/foo/meta/main.yml

---
dependencies:
  - { role: child, when: false }"><pre class="notranslate"><code class="notranslate"># roles/foo/meta/main.yml

---
dependencies:
  - { role: child, when: false }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/bar/meta/main.yml

---
dependencies:
  - { role: child }"><pre class="notranslate"><code class="notranslate"># roles/bar/meta/main.yml

---
dependencies:
  - { role: child }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# roles/parent/meta/main.yml

---
dependencies:
  - { role: foo }
  - { role: bar }"><pre class="notranslate"><code class="notranslate"># roles/parent/meta/main.yml

---
dependencies:
  - { role: foo }
  - { role: bar }
</code></pre></div>
<p dir="auto">If the <em>parent</em> role is used, then <em>child</em> will never be executed.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Roles are re-run if required by subsequent roles, and have not been run already (under no-duplicate roles policy).</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Role is skipped for the rest of the play.</p>