Rundeck Ansible Plugin

https://github.com/Batix/rundeck-ansible-plugin

https://github.com/Batix/rundeck-ansible-plugin/releases/latest

wget https://github.com/Batix/rundeck-ansible-plugin/releases/download/2.0.2/ansible-plugin-2.0.2.jar -P /var/lib/rundeck/libext/

* Create a new project
http:///resources/createProject

Project Name: Ansible
Default Node Executor: "Ansible Ad-Hoc Node Executor"
Executable: /bin/bash
SSH Connection > SSH Authentication: privateKey

Default Node File Copier
SSH Connection: privateKey

apt-get install ansible
su rundeck -s /bin/bash -c "ansible all -m ping"

cd /var/lib/rundeck

scp -a ~/ansible root@rundeck.example.com:/etc/ansible/

scp -3r root@foo.example.com:/var/lib/nagios/.ssh/id_rsa* root@rundeck.example.com:/var/lib/rundeck/

chown rundeck:rundeck /var/lib/rundeck/.ssh -R

# enable access
echo "$(hostname -f) ansible_user=root" >> /etc/ansible/hosts
cat /var/lib/rundeck/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

# check
su rundeck -s /bin/bash -c "ansible all -m ping"

# debug
echo "ansible.debug=true" >> /etc/rundeck/profile
service rundeckd restart
tail -f /var/log/rundeck/service.log

# login as user rundeck
su rundeck -s /bin/bash