ansible / ansible-modules-extras

Ansible extra modules - these modules ship with ansible
948 stars 1.46k forks source link

sefcontext KeyError #3619

Closed pastephens closed 7 years ago

pastephens commented 7 years ago

Done.

ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
ansible 2.2.0.0
  config file = /home/stephens1/ansible/ansible.cfg
  configured module search path = ['/usr/share/ansible']
CONFIGURATION
OS / ENVIRONMENT

From: Fedora 24 To: RHEL7

SUMMARY

Module fails outside of check-mode, but seems to work fine in check-mode.

STEPS TO REPRODUCE
- name: allow appdynamics to read mysql logs
  sefcontext: target='/var/log/mysql(/.*)?'  setype=mysqld_db_t state=present
  tags: conf,selinux
EXPECTED RESULTS

SUCCESS!

ACTUAL RESULTS
fatal: ["hostname"]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "ftype": "a",
            "reload": true,
            "selevel": null,
            "setype": "mysqld_db_t",
            "seuser": "system_u",
            "state": "present",
            "target": "/var/log/mysql(/.*)?"
        },
        "module_name": "sefcontext"
    },
    "msg": "KeyError: 'all files'\n"
}
ansibot commented 7 years ago

@dagwieers ping, this issue is waiting for your response. click here for bot help

dagwieers commented 7 years ago

resolved_by_pr #3569