rundeck-plugins / ansible-plugin

Ansible Integration for Rundeck
MIT License
331 stars 100 forks source link

project variable not used as default ? #360

Closed olwins closed 3 months ago

olwins commented 6 months ago

Hi

In my test project, I defined the variable as follow to run my playbook using an ssh key + passphrase, and password to become root

project.ansible-become-method=sudo project.ansible-become-password-storage-path=keys/project/TEST_PATCHING_LINUX/password-itansible-root project.ansible-become=true project.ansible-binaries-dir-path=/opt/ansible/.venv/bin project.ansible-config-file-path=/opt/ansible/ansible.cfg project.ansible-executable=/bin/bash project.ansible-generate-inventory=true project.ansible-ssh-auth-type=privateKey project.ansible-ssh-keypath=/var/lib/rundeck/.ssh/id_ed25519 project.ansible-ssh-passphrase-option=option.password project.ansible-ssh-passphrase-storage-path=keys/project/TEST_PATCHING_LINUX/Pass_itmasteransible project.ansible-ssh-use-agent=true project.ansible-ssh-user=itansible

1) If I run a Ansible Playbook Workflow Node Step , it work , but only if I redefine a few ssh variables If not, the ssh connection failed

SSH Passphrase from secure option: option.password Use become privilege escalation.: Yes Privilege escalation Password Storage Path.: keys/project/TEST_PATCHING_LINUX/password-itansible-root

Should it not used the default value defined as the project level ?

2) Sometime I need to run a job locally ,that doesn't use the rundesk inventory. (I manually pass the inventory/limit as parameter)

In that case, I use an "ansible playbook" workflow that use the disable-limit option

It work, but only If I redefine all ssh setting at the job level

Same, should it not used by default the value defined at the project level ?

Job : Ansible base directory path: /opt/ansible Playbook: test.yaml Extra Variables: 1 lines Inline inventory: 1 lines Extra Ansible arguments: -i inventory/test-inv.yaml -l my_server SSH Authentication: privateKey SSH Key File path: /var/lib/rundeck/.ssh/id_ed25519 Use ssh-agent.: Yes SSH Passphrase for private key: keys/project/TEST_PATCHING_LINUX/Pass_itmasteransible SSH Passphrase from secure option: option.password Use become privilege escalation.: Yes Privilege escalation Password Storage Path.: keys/project/TEST_PATCHING_LINUX/password-itansible-root Disable Limit: Yes

My configuration: Rundeck 5.1.2 rpm install (redhat 9) Postgresql database (install done recently to test the software)

olwins commented 3 months ago

No issue for me in the latest release