Git Product home page Git Product logo

Comments (7)

riemers avatar riemers commented on June 6, 2024

I do know there where some changes with the become rights, if you could verify that would be nice.

from ansible-gitlab-runner.

chrisrohr avatar chrisrohr commented on June 6, 2024

Yes I can verify this. Here is the output without the become: yes on those two tasks:

TASK [gitlab-runner : (Unix) List configured runners] *******************************************************************************************************************************************
ok: [runner] => {"changed": false, "cmd": ["gitlab-runner", "list"], "delta": "0:00:00.036978", "end": "2019-12-13 12:46:41.930483", "rc": 0, "start": "2019-12-13 12:46:41.893505", "stderr": "Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=9982 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0\nListing configured runners                        \u001b[0;m  ConfigFile\u001b[0;m=/home/ec2-user/.gitlab-runner/config.toml", "stderr_lines": ["Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=9982 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0", "Listing configured runners                        \u001b[0;m  ConfigFile\u001b[0;m=/home/ec2-user/.gitlab-runner/config.toml"], "stdout": "", "stdout_lines": []}

TASK [gitlab-runner : (Unix) Check runner is registered] ****************************************************************************************************************************************
ok: [runner] => {"changed": false, "cmd": ["gitlab-runner", "verify"], "delta": "0:00:00.060844", "end": "2019-12-13 12:46:42.791398", "rc": 0, "start": "2019-12-13 12:46:42.730554", "stderr": "Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=10060 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0\n\u001b[0;33mWARNING: Running in user-mode.                    \u001b[0;m \n\u001b[0;33mWARNING: The user-mode requires you to manually start builds processing:\u001b[0;m \n\u001b[0;33mWARNING: $ gitlab-runner run                      \u001b[0;m \n\u001b[0;33mWARNING: Use sudo for system-mode:                \u001b[0;m \n\u001b[0;33mWARNING: $ sudo gitlab-runner...                  \u001b[0;m \n                                                  \u001b[0;m ", "stderr_lines": ["Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=10060 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0", "\u001b[0;33mWARNING: Running in user-mode.                    \u001b[0;m ", "\u001b[0;33mWARNING: The user-mode requires you to manually start builds processing:\u001b[0;m ", "\u001b[0;33mWARNING: $ gitlab-runner run                      \u001b[0;m ", "\u001b[0;33mWARNING: Use sudo for system-mode:                \u001b[0;m ", "\u001b[0;33mWARNING: $ sudo gitlab-runner...                  \u001b[0;m ", "                                                  \u001b[0;m "], "stdout": "", "stdout_lines": []}

As you can see in the first, there aren't any runners listed and in the second it warns about needing sudo. (In this test case I did already have a runner registered and running) Also you can see the config file is in my home directory.

Running with become: true set has the following output:

TASK [gitlab-runner : (Unix) List configured runners] *******************************************************************************************************************************************
ok: [runner] => {"changed": false, "cmd": ["gitlab-runner", "list"], "delta": "0:00:00.030840", "end": "2019-12-13 13:02:35.680896", "rc": 0, "start": "2019-12-13 13:02:35.650056", "stderr": "Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=20420 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0\nListing configured runners                        \u001b[0;m  ConfigFile\u001b[0;m=/etc/gitlab-runner/config.toml\nci                                                \u001b[0;m  Executor\u001b[0;m=shell Token\u001b[0;m=EagwTpB1wSWi1evgvigG URL\u001b[0;m=https://gitlab.com/ci", "stderr_lines": ["Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=20420 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0", "Listing configured runners                        \u001b[0;m  ConfigFile\u001b[0;m=/etc/gitlab-runner/config.toml", "ci                                                \u001b[0;m  Executor\u001b[0;m=shell Token\u001b[0;m=<my-token> URL\u001b[0;m=https://gitlab.com/ci"], "stdout": "", "stdout_lines": []}

TASK [gitlab-runner : (Unix) Check runner is registered] ****************************************************************************************************************************************
ok: [runner] => {"changed": false, "cmd": ["gitlab-runner", "verify"], "delta": "0:00:02.135855", "end": "2019-12-13 13:02:38.768864", "rc": 0, "start": "2019-12-13 13:02:36.633009", "stderr": "Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=20502 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0\nRunning in system-mode.                           \u001b[0;m \n                                                  \u001b[0;m \nVerifying runner... is alive                      \u001b[0;m  runner\u001b[0;m=<my-token>“, "stderr_lines": ["Runtime platform                                  \u001b[0;m  arch\u001b[0;m=amd64 os\u001b[0;m=linux pid\u001b[0;m=20502 revision\u001b[0;m=577f813d version\u001b[0;m=12.5.0", "Running in system-mode.                           \u001b[0;m ", "                                                  \u001b[0;m ", "Verifying runner... is alive                      \u001b[0;m  runner\u001b[0;m=<my-token>“], "stdout": "", "stdout_lines": []}

Here it is using the global config and finds my runner.

I know this is a simple change, but please let me know if you want a PR for it. Thanks

from ansible-gitlab-runner.

riemers avatar riemers commented on June 6, 2024

PR would be good, think we would need more tests on the build to find these types of issues but thats for another rainy day.

from ansible-gitlab-runner.

chrisrohr avatar chrisrohr commented on June 6, 2024

PR sent

from ansible-gitlab-runner.

riemers avatar riemers commented on June 6, 2024

I think it was introduced with #71 btw..

from ansible-gitlab-runner.

chrisrohr avatar chrisrohr commented on June 6, 2024

Yes, looks like these 2 were overlooked.

from ansible-gitlab-runner.

riemers avatar riemers commented on June 6, 2024

Think this one can be closed ;p

from ansible-gitlab-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.