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

Discover Version Number Taks fails on RHEL #27

Closed
Yojimbo108 opened this issue Mar 24, 2017 · 5 comments
Closed

Discover Version Number Taks fails on RHEL #27

Yojimbo108 opened this issue Mar 24, 2017 · 5 comments
Assignees
Labels

Comments

@Yojimbo108
Copy link

Yojimbo108 commented Mar 24, 2017

I get the below error running this on CentOS 7

TASK [neel.rundeck : discover version number] **********************************
fatal: [rundeck.aem.bt.com]: FAILED! => {"changed": true, "cmd": "dpkg -s rundeck | grep -i version", "delta": "0:00:00.002894", "end": "2017-03-24 11:17:55.840221", "failed": true, "rc": 1, "start": "2017-03-24 11:17:55.837327", "stderr": "/bin/sh: dpkg: command not found", "stdout": "", "stdout_lines": [], "warnings": []}

I think this is down to the below section in main.yml

# install rundeck
- include: install_debian.yml
  when: ansible_os_family == 'Debian'

- include: install_redhat.yml
  when: ansible_os_family == 'RedHat'

- name: discover version number
  shell: dpkg -s rundeck | grep -i version
  register: rundeck_targeting_version

Looks like you need to push that discover version number task up into install_debian.yml & install_redhat.yml and use something like rpm -qi rundeck on Redhat instead of dpkg.

Thanks

@mat-green
Copy link
Member

Hello,

Thank you for this and I will do as you suggest.

M

@Yojimbo108
Copy link
Author

Cool, I'm not sure if you want to use rpm -qi as it throws an ansible warning:

TASK [neel.rundeck : Redhat | discover version number] *************************
ok: [rundeck.aem.bt.com]
 [WARNING]: Consider using yum, dnf or zypper module rather than running rpm

so I'm not sure if there's something better to use!

Thanks

mat-green pushed a commit that referenced this issue Mar 28, 2017
@mat-green mat-green self-assigned this Mar 28, 2017
@mat-green mat-green added the bug label Mar 28, 2017
@mat-green
Copy link
Member

I am considering this fixed.

@Russell-IO
Copy link
Contributor

Russell-IO commented Jul 2, 2017

@mat-green I was having this bug too with tag 17.03.16 (just switched the rundeck base image from Ubuntu 16.04 => Centos 7.3) however, after checking out 17.04.17 it works as expected

@mat-green
Copy link
Member

Yes, this was fixed in 17.04.17.

Farzy pushed a commit to ChauffeurPrive/ansible-rundeck that referenced this issue Jun 5, 2019
Farzy pushed a commit to ChauffeurPrive/ansible-rundeck that referenced this issue Jun 5, 2019
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