Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

T-Sec.LinuxOS.Compliance : req-013.2 and T-Sec.SSH.Compliance : req-002.1 issue: The error was: 'dict object' has no attribute 'stdout_lines' #1

Open
hodigy opened this issue Feb 18, 2019 · 1 comment

Comments

@hodigy
Copy link

hodigy commented Feb 18, 2019

I have common issues in both checks, details see below.
Ansible and python versions I used in my checks:
System1: Ansible 2.5 with python 2.7
System2: Ansible 2.7, python with Python 3.6.

Errors:
TASK [T-Sec.LinuxOS.Compliance : req-013.2 combine found files with default whitelist] *******************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'stdout_lines'\n\nThe error appears to have been in '/home/ubuntu/TelekomSecurity.Compliance.Automation-master/T-Sec.LinuxOS.Compliance/tasks/hardening_linux(01)basic-hardening.yml': line 221, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: req-013.2 combine found files with default whitelist\n ^ here\n"}

TASK [T-Sec.SSH.Compliance : req-002.1 remove all primes smaller than defined value] *********************************************************************
fatal: [localhost]: FAILED! => {"msg": "The conditional check 'config_ssh_server and ssh_moduli.stdout != ""' failed. The error was: error while evaluating conditional (config_ssh_server and ssh_moduli.stdout != ""): 'dict object' has no attribute 'stdout'\n\nThe error appears to have been in '/home/ubuntu/TelekomSecurity.Compliance.Automation-master/T-Sec.SSH.Compliance/tasks/hardening_ssh(01)ssh-requirements.yml': line 17, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: req-002.1 remove all primes smaller than defined value\n ^ here\n"}

@rascherm
Copy link
Collaborator

Yet I was not able to reproduce this error. Does this problem still persist?

ansible 2.5.1 / python version = 2.7.15+ (default, Oct  7 2019, 17:39:04) [GCC 7.4.0]
mrascher@tsca-u1804:~$ python --version  
Python 2.7.15+
mrascher@tsca-u1604:~$ python --version  
Python 2.7.12
mrascher@tsca-u1404:~$ python --version  
Python 2.7.6
[mrascher@tsca-centos7 ~]$ python --version  
Python 2.7.5
TASK [T-Sec.LinuxOS.Compliance : req-013.2 combine found files with default whitelist] ***************************************************************************************************************************************************************************
ok: [tsca-1804] => {"ansible_facts": {"suid": []}, "changed": false}                                                                                                                                                                                              
ok: [tsca-1604] => {"ansible_facts": {"suid": []}, "changed": false}                                                                                                                                                                                              
ok: [tsca-1404] => {"ansible_facts": {"suid": []}, "changed": false}                                                                                                                                                                                              
ok: [tsca-cos7] => {"ansible_facts": {"suid": ["/usr/bin/su", "/usr/bin/mount", "/usr/bin/umount", "/usr/bin/staprun", "/usr/sbin/pam_timestamp_check", "/usr/sbin/unix_chkpwd", "/usr/sbin/netreport", "/usr/sbin/usernetctl", "/usr/sbin/userhelper", "/usr/lib/
polkit-1/polkit-agent-helper-1", "/usr/libexec/dbus-1/dbus-daemon-launch-helper", "/usr/libexec/openssh/ssh-keysign", "/usr/libexec/abrt-action-install-debuginfo-to-abrt-cache"]}, "changed": false}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants