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

Nodes not importing #13

Closed
sgreen-hobsons opened this issue Mar 29, 2016 · 8 comments
Closed

Nodes not importing #13

sgreen-hobsons opened this issue Mar 29, 2016 · 8 comments
Labels

Comments

@sgreen-hobsons
Copy link

I'm running ansible & Rundeck in a test environment with a simple /etc/ansible/hosts with two hosts listed. For some reason, the plugin is not pulling in the Nodes. All of my permissions are configured correctly. Any thoughts?

@frozenice
Copy link
Contributor

Did you check the requirements from the README? Especially the command: su rundeck -s /bin/bash -c "ansible all -m ping"

@sgreen-hobsons
Copy link
Author

I actually have rundeck setup to run as root instead of the rundeck user (don't ask why, just go with it...). My hosts file is very simple:

[sjc1]
localhost ansible_connection=local
10.24.128.31 ansible_ssh_user=ansi

I can successfully run any modules or playbooks from the command line as root or ansi user. Also, currently using 1.2.0 of the plugin & had the same issue with 1.0.1.

@frozenice
Copy link
Contributor

Hm, what OS is this and what Rundeck and Ansible versions are you using? How did you install Rundeck and Ansible (.deb, pip, ...)? Anything else special except for the root user? Maybe I can reproduce this in a VM.

@sgreen-hobsons
Copy link
Author

CentOS 6.7 & all packages installed from epel repo or rundeck's repo:

ansible1.9-1.9.4-2.el6.noarch
rundeck-repo-4-0.noarch
rundeck-config-2.6.4-1.15.GA.noarch
rundeck-2.6.4-1.15.GA.noarch

Nothing else special about it, really. After installation, the only change I made was to /etc/init.d/rundeckd.

nohup runuser -s /bin/bash -l root -c "$rundeckd" >>$servicelog 2>&1 &

I didn't change ownership of /var/lib/rundeck at all, if that matters. I figured running as root there wouldn't be any kind permissions issue. It's definitely baffling me....

@frozenice
Copy link
Contributor

Okay, after some fighting with CentOS (never used it or any other of this family) and manually testing the playbook, the solution seems to be:
yum install libselinux-python

Ansible complained with this:

failed: [localhost -> 127.0.0.1] => {"failed": true}
msg: Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!

If you can confirm this, I'll add it to the README. Maybe also another test command for the playbook...

@sgreen-hobsons
Copy link
Author

That did it, man! Another option would be to set SELINUX=disabled in /etc/sysconfig/selinux & reboot.

Thanks for the assist.

@frozenice
Copy link
Contributor

Cool! I added a note to the README.

@rilindo
Copy link

rilindo commented Mar 29, 2016

@sgreen-hobsons if it is SElinux, don't disable it. Instead, run:

sealert -a /var/log/audit/audit.log

And it will tell you the issue as well as the fix.

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

No branches or pull requests

3 participants