# Troubleshooting Ansible Playbook Errors

**URL:** <https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [July 16, 2018, 4:31pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058 "2018-07-16T16:31:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [July 16, 2018, 4:31pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/1 "2018-07-16T16:31:33Z")

</div>

Hey all, so I’m trying to run this playbook that I found on github for implementing DOD STIG’s on RHEL.

[https://github.com/MindPointGroup/RHEL7-STIG](https://github.com/MindPointGroup/RHEL7-STIG)

It works well but there are several that fail and while I’m very new to ansible and learning the troubleshooting processes, I’m trying to isolate these in how they can be remedied.

I’m running this command: ansible-playbook stig.yml -u tsg -vvvv --tag RHEL-07-010200 --ask-pass

And it is erroring out here:

failed: [stig-test-lx] (item={u’state’: u’args\_absent’, u’args’: [u’md5’, u’bigcrypt’, u’sha256’, u’blowfish’]}) =\> {  
“changed”: false,  
“item”: {  
“args”: [  
“md5”,  
“bigcrypt”,  
“sha256”,  
“blowfish”  
],  
“state”: “args\_absent”  
},  
“module\_stderr”: “OpenSSH\_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017\r\ndebug1: Reading configuration data /etc/ssh/ssh\_config\r\ndebug1: /etc/ssh/ssh\_config line 49: Applying options for \*\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O\_NONBLOCK\r\ndebug2: mux\_client\_hello\_exchange: master version 4\r\ndebug3: mux\_client\_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux\_client\_request\_session: entering\r\ndebug3: mux\_client\_request\_alive: entering\r\ndebug3: mux\_client\_request\_alive: done pid = 28682\r\ndebug3: mux\_client\_request\_session: session request sent\r\ndebug1: mux\_client\_request\_session: master session id: 2\r\ndebug3: mux\_client\_read\_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\nShared connection to stig-test-lx closed.\r\n”,  
“module\_stdout”: “\r\nTraceback (most recent call last):\r\n File "/tmp/ansible\_PBwk05/ansible\_module\_pamd.py", line 785, in \r\n main()\r\n File "/tmp/ansible\_PBwk05/ansible\_module\_pamd.py", line 752, in main\r\n valid, msg = service.validate()\r\n File "/tmp/ansible\_PBwk05/ansible\_module\_pamd.py", line 656, in validate\r\n if not current\_line.is\_valid()[0]:\r\nTypeError: ‘bool’ object is not callable\r\n”,  
“msg”: “MODULE FAILURE”,  
“rc”: 1  
}

Any help would be greatly appreciated. Also, when I don’t isolate to a specific tag, I get several other errors, but this should hopefully help me move forward.

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [July 16, 2018, 5:03pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/2 "2018-07-16T17:03:16Z")

</div>

I don’t see an inventory specified in your command line. Have you been able to run any other playbook against the host you ran with stig.ym?

Perhaps try running a simple playbook with a ping module to make sure the connection is working before running with more complex playbook?  
Which type of connection are you using? ssh, local, paramiko?

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [July 16, 2018, 5:05pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/3 "2018-07-16T17:05:32Z")

</div>

Thanks for the quick response. I am able to do several other checks. Here is my playbook. Pretty simple:

- hosts: stig-test-lx  
roles:
- role: RHEL7-STIG  
when:
- ansible\_os\_family == ‘RedHat’
- ansible\_distribution\_major\_version | version\_compare(‘7’, ‘=’)

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [July 16, 2018, 5:06pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/4 "2018-07-16T17:06:54Z")

</div>

This is the specific check that it’s trying to check and perform:

- name: “MEDIUM | RHEL-07-010200 | PATCH | The PAM system service must be configured to store only encrypted representations of passwords.”  
pamd:  
name: system-auth  
state: “{{ item.state }}”  
type: password  
control: sufficient  
module\_path: pam\_unix.so  
module\_arguments: “{{ item.args }}”  
with\_items:
- state: args\_present  
args:
- “sha512”
- state: args\_absent  
args:
- “md5”
- “bigcrypt”
- “sha256”
- “blowfish”  
when: rhel\_07\_010200  
tags:
- RHEL-07-010200
- pamd

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 16, 2018, 5:31pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/5 "2018-07-16T17:31:30Z")

</div>

This looks like a bug in Ansible, have you search the issue tracker for this?

---

<div class="post-metadata">

**Author:** ![Chris\_Bidwell](https://avatars.discourse-cdn.com/v4/letter/c/da6949/32.png) [@Chris\_Bidwell](https://forum.ansible.com/u/Chris_Bidwell)\
**Post date:** [July 16, 2018, 5:59pm UTC](https://forum.ansible.com/t/troubleshooting-ansible-playbook-errors/28058/6 "2018-07-16T17:59:44Z")

</div>

I have not. I will check on that and see if there is one and submit if need be. Thanks again!
