V-38604 ypbind service in cat2.yml not properly written, breaks in ansible v2
juliedavila opened this issue · 1 comments
juliedavila commented
The following:
- name: V-38604 Medium The ypbind service must not be running
service: name=ypbind state=stopped enabled=no
register: ypbind_test
when: ypbind_test.msg is defined and "'FAIL' not in ypbind_test.msg"
tags: [ 'cat2' , 'V-38604' , 'insecure_services' , 'ypbind' ]
shouldn't work in ansible v1, but it does and it improperly skips the task every time. The register
var being used in the conditional in the same task is not proper.
TODO: Refactor so that the presence of ypbind is checked in a separate task prior to attempting to stop/disabling the service.
samdoran commented
Fixed in this commit
There is a task in prelim.yml
that enumerates all services on the system. It was not being leveraged for this task but now is.