Graylog2 / graylog-ansible-role

Ansible role which installs and configures Graylog
Apache License 2.0
212 stars 127 forks source link

Error: No package matching 'mongodb_packages_dependencies #68

Closed beingnishas closed 4 years ago

beingnishas commented 7 years ago

Hi I have followed the steps, everything is downloaded in roles, but while running on vagrant there is dependecy related issue. Do I need to manually install the dependecy first and then run the playbook? Please refer the error output below:

[vagrant@localhost testGraylog_role]$ ansible-playbook your_playbook.yml -i "127.0.0.1:22,"

PLAY [all] *********************************************************************

TASK [setup] *******************************************************************
ok: [127.0.0.1]

TASK [lesmyrmidons.mongodb : Include OS-specific variables.] *******************
ok: [127.0.0.1]

TASK [lesmyrmidons.mongodb : RedHat Install dependencies packages] *************
failed: [127.0.0.1] (item=[u'mongodb_packages_dependencies']) => {"changed": false, "failed": true, "item": ["mongodb_packages_dependencies"], "msg": "No package matching 'mongodb_packages_dependencies' found available, installed or updated", "rc": 126, "results": ["No package matching 'mongodb_packages_dependencies' found available, installed or updated"]}
        to retry, use: --limit @/home/vagrant/testGraylog_role/your_playbook.retry

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=2    changed=0    unreachable=0    failed=1

===============================================================
Detailed issue summary:
TASK [lesmyrmidons.mongodb : RedHat | Install dependencies packages] ***********
task path: /home/vagrant/testGraylog_role/roles/lesmyrmidons.mongodb/tasks/setup-RedHat.yml:3
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/packaging/os/yum.py
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892 `" && echo ansible-tmp-1488959605.12-14485318799892="` echo ~/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892 `" ) && sleep 0'"'"''
<127.0.0.1> PUT /tmp/tmpUlJk_e TO /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py
<127.0.0.1> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[127.0.0.1]'
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/ /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py && sleep 0'"'"''
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-pzcgadtwszahupzxbcakaoixfvitdbai; /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
failed: [127.0.0.1] (item=[u'mongodb_packages_dependencies']) => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "conf_file": null,
            "disable_gpg_check": false,
            "disablerepo": null,
            "enablerepo": null,
            "exclude": null,
            "install_repoquery": true,
            "list": null,
            "name": [
                "mongodb_packages_dependencies"
            ],
            "state": "installed",
            "update_cache": false,
            "validate_certs": true
        },
        "module_name": "yum"
    },
    "item": [
        "mongodb_packages_dependencies"
    ],
    "msg": "No package matching 'mongodb_packages_dependencies' found available, installed or updated",
    "rc": 126,
    "results": [
        "No package matching 'mongodb_packages_dependencies' found available, installed or updated"
    ]
}
mariussturm commented 7 years ago

@Niceha did you make sure that you used the master branch of the mongodb role and a supported ansible version. See https://github.com/Graylog2/graylog-ansible-role#dependencies and https://github.com/Graylog2/graylog-ansible-role/blob/master/requirements.yml

tharak135 commented 6 years ago

I'm trying to install nginx on my node machines, looks like Not an Ansible problem, yum says it can't find nginx .could you please help me to resolve.thanks

nginx.yml file



  • hosts : test

    tasks :

    • name : install nginx yum : pkg=nginx state=installed

      notify :

      • start nginx

    handlers :

    • name : start nginx service : name=nginx state=started

ansible-playbook nginx.yml

Error:

"msg": "No package matching 'nginx' found available, installed or updated", "rc": 126,

beingnishas commented 6 years ago

@tharak135 : make sure you use name: instead of pkg: while using yum module of ansible Also, nginx isnt directly available in yum default repos, you need to first add a repo file. OR in case you directly want to install use rpm package in yum.

tharak135 commented 6 years ago

@Niceha : I set up EPEL repo for centos and installed Ansible using yum.

yum -y install epel-release yum -y update yum install ansible

do you want me try to intall EPEL repo using rpm and try to install ansible again

Thanks

tharak135 commented 6 years ago

virtualbox-ansible

malcyon commented 4 years ago

Closing this as it's over 2 years old now. If you are still running into this issue, feel free to reopen.