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

rpminspect with ansible #42

Closed
morucci opened this issue Sep 12, 2019 · 2 comments
Closed

rpminspect with ansible #42

morucci opened this issue Sep 12, 2019 · 2 comments

Comments

@morucci
Copy link
Contributor

morucci commented Sep 12, 2019

Hi David,

rpminspect returns an error when run through ansible. I can mitigate the issue with the json output.

➜  zuul-distro-jobs git:(master) ✗ cat test2.yaml 
- hosts: localhost
  tasks:
    - shell: rpminspect /home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm
➜  zuul-distro-jobs git:(master) ✗ ls /home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm
/home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm
➜  zuul-distro-jobs git:(master) ✗ ansible-playbook -vv test2.yaml 
ansible-playbook 2.8.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/fabien/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.7.4 (default, Jul  9 2019, 16:48:28) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
Using /etc/ansible/ansible.cfg as config file
 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'


PLAYBOOK: test2.yaml ***********************************************************************************************************************
1 plays in test2.yaml

PLAY [localhost] ***************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************
task path: /home/fabien/git/pagure.io/zuul-distro-jobs/test2.yaml:1
ok: [localhost]
META: ran handlers

TASK [shell] *******************************************************************************************************************************
task path: /home/fabien/git/pagure.io/zuul-distro-jobs/test2.yaml:3
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "rpminspect /home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm", "delta": "0:00:00.266278", "end": "2019-09-12 21:32:23.128883", "msg": "non-zero return code", "rc": -6, "start": "2019-09-12 21:32:22.862605", "stderr": "*** Unable to get terminal window size: Inappropriate ioctl for device\n*** Unable to get terminal window size: Inappropriate ioctl for device\nrpminspect: ../lib/strfuncs.c:108: printwrap: Assertion `width > 0' failed.", "stderr_lines": ["*** Unable to get terminal window size: Inappropriate ioctl for device", "*** Unable to get terminal window size: Inappropriate ioctl for device", "rpminspect: ../lib/strfuncs.c:108: printwrap: Assertion `width > 0' failed."], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0 

➜  zuul-distro-jobs git:(master) ✗ cat test2.yaml 
- hosts: localhost
  tasks:
    - shell: rpminspect -o out.json -F json /home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm
➜  zuul-distro-jobs git:(master) ✗ ansible-playbook -vv test2.yaml
ansible-playbook 2.8.2
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/fabien/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.7.4 (default, Jul  9 2019, 16:48:28) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]
Using /etc/ansible/ansible.cfg as config file
 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'


PLAYBOOK: test2.yaml ***********************************************************************************************************************
1 plays in test2.yaml

PLAY [localhost] ***************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************
task path: /home/fabien/git/pagure.io/zuul-distro-jobs/test2.yaml:1
ok: [localhost]
META: ran handlers

TASK [shell] *******************************************************************************************************************************
task path: /home/fabien/git/pagure.io/zuul-distro-jobs/test2.yaml:3
changed: [localhost] => {"changed": true, "cmd": "rpminspect -o out.json -F json /home/fabien/git/src.fedoraproject.org/python-gear/python3-gear-0.14.0-6.fc32.noarch.rpm", "delta": "0:00:00.025018", "end": "2019-09-12 21:37:58.165309", "rc": 0, "start": "2019-09-12 21:37:58.140291", "stderr": "*** Unable to get terminal window size: Inappropriate ioctl for device", "stderr_lines": ["*** Unable to get terminal window size: Inappropriate ioctl for device"], "stdout": "", "stdout_lines": []}
META: ran handlers
META: ran handlers

PLAY RECAP *********************************************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
@dcantrell
Copy link
Collaborator

I see it in there. It's my routine to get the terminal window size. I can modify that to just not word wrap if it can't figure out your terminal.

@dcantrell
Copy link
Collaborator

Fixed in master.

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

2 participants