ansible-prometheus icon indicating copy to clipboard operation
ansible-prometheus copied to clipboard

Download prometheus remotely

Open robinlehrmann opened this issue 2 years ago • 2 comments

Why not downloading it on the server directly? I had this error on my mac and thought it makes maybe sense to move the download directly to the server maybe?

fatal: [hetzner -> localhost]: FAILED! => {"changed": false, "msg": "Failed to find handler for \"/Users/robin.lehrmann/.ansible/tmp/ansible-tmp-1658956957.405443-31742-268351212854059/source\". Make sure the required command to extract the file is installed.\nCommand \"/usr/bin/tar\" detected as tar type bsd. GNU tar required.\nCommand \"/usr/bin/unzip\" could not handle archive:   End-of-central-directory signature not found.  Either this file is not\n  a zipfile, or it constitutes one disk of a multi-part archive.  In the\n  latter case the central directory and zipfile comment will be found on\n  the last disk(s) of this archive.\nnote:  /Users/robin.lehrmann/.ansible/tmp/ansible-tmp-1658956957.405443-31742-268351212854059/source may be a plain executable, not an archive\nunzip:  cannot find zipfile directory in one of /Users/robin.lehrmann/.ansible/tmp/ansible-tmp-1658956957.405443-31742-268351212854059/source or\n        /Users/robin.lehrmann/.ansible/tmp/ansible-tmp-1658956957.405443-31742-268351212854059/source.zip, and cannot find /Users/robin.lehrmann/.ansible/tmp/ansible-tmp-1658956957.405443-31742-268351212854059/source.ZIP, period.\n"}

robinlehrmann avatar Jul 27 '22 21:07 robinlehrmann

👍 for this. I am unable to install Prometheus on my Linux servers using a Mac as an Ansible controller, due to the following error:

fatal: [172.30.37.131 -> localhost]: FAILED! => {
    "attempts": 5,
    "changed": false,
    "module_stderr": "sudo: a password is required\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

This PR solves the issue.

ashleykleynhans avatar Aug 10 '22 12:08 ashleykleynhans

👍 for this. I am unable to install Prometheus on my Linux servers using a Mac as an Ansible controller, due to the following error:

fatal: [172.30.37.131 -> localhost]: FAILED! => {
    "attempts": 5,
    "changed": false,
    "module_stderr": "sudo: a password is required\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

you can also use

ansible-playbook --ask-become-pass

or

ansible-playbook -K

thank you for the review :)

robinlehrmann avatar Aug 10 '22 20:08 robinlehrmann

I think we should put this in a variable so that users can choose which method they want. You can't be sure everyone can/wants the binary to be downloaded on the remote server.

gardar avatar Nov 24 '22 14:11 gardar

Hi, we would really appreciate this option. Are you planning to continue working on this or would you mind if someone else added an option to enable remote downloads?

Chasethechicken avatar Jan 08 '23 18:01 Chasethechicken

This role has been deprecated in favor of a the prometheus-community/ansible collection.

SuperQ avatar Mar 06 '23 15:03 SuperQ