Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELinux check fails #173

Open
sgrimm-sg opened this issue Aug 30, 2016 · 3 comments
Open

SELinux check fails #173

sgrimm-sg opened this issue Aug 30, 2016 · 3 comments

Comments

@sgrimm-sg
Copy link

The ansible_selinux variable is a boolean (at least in Ansible 2.1.1.0) but it's being treated as an object:

fatal: [REDACTED]: FAILED! => {"failed": true, "msg": "The conditional check 'consul_is_ui and consul_install_nginx_config and ansible_selinux.status == "enabled"' failed. The error was: error while evaluating conditional (consul_is_ui and consul_install_nginx_config and ansible_selinux.status == "enabled"): 'bool object' has no attribute 'status'\n\nThe error appears to have been in '/[REDACTED]/ansible/roles/savagegus.ansible-consul/tasks/install-ui.yml': line 79, 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: allow nginx to connect to consul (selinux)\n ^ here\n"}

Workaround is to add a role variable ansible_selinux: { "status": "disabled" } when including this role.

@jeremyjh
Copy link
Contributor

I believe this is caused by d87b2f2 , @trevorr

@trevorr
Copy link
Contributor

trevorr commented Nov 16, 2016

It's not a boolean for me with Ansible 2.1.1.0:

$ ansible --version && ansible -i myhost, all -m setup | grep ansible_selinux -C 2
ansible 2.1.1.0
        },
        "ansible_python_version": "2.6.6",
        "ansible_selinux": {
            "status": "disabled"
        },

@sgirones
Copy link
Contributor

Before installing python-selinux:

        "ansible_python_version": "2.7.6",
        "ansible_selinux": false,
        "ansible_service_mgr": "upstart",

After installing python-selinux:

        "ansible_python_version": "2.7.6",
        "ansible_selinux": {
            "status": "disabled"
        },

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

No branches or pull requests

4 participants