Skip to content

bug: Can't recreate runner #198

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

Open
mihalt opened this issue Apr 19, 2024 · 1 comment
Open

bug: Can't recreate runner #198

mihalt opened this issue Apr 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mihalt
Copy link

mihalt commented Apr 19, 2024

Summary

Hi! When I run your playbook after my linux machine was rebooted, or maybe when I changed PAT token in github, I have now error

"stderr": "Cannot configure the runner because it is already configured. To reconfigure the runner, run 'config.cmd remove' or './config.sh remove' first.", "stderr_lines": ["Cannot configure the runner because it is already configured. To reconfigure the runner, run 'config.cmd remove' or './config.sh remove' first."]

I got it after I removed no_logs here

- name: Register runner # noqa no-changed-when
environment:
RUNNER_ALLOW_RUNASROOT: "1"
ansible.builtin.command:
"{{ runner_dir }}/./config.sh \
--url {{ github_full_url }} \
--token {{ registration.json.token }} \
--name '{{ runner_name }}' \
--labels {{ runner_labels | join(',') }} \
--runnergroup {{ runner_group }} \
--unattended \
{{ runner_extra_config_args }}"
args:
chdir: "{{ runner_dir }}"
changed_when: true
become_user: "{{ runner_user }}"
become: true
no_log: "{{ hide_sensitive_logs | bool }}"
when: runner_name not in registered_runners.json.runners|map(attribute='name')|list

Issue Type

Bug Report

Ansible Version

ansible [core 2.16.4]
  config file = /home/user/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/user/.local/bin/ansible
  python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Steps to Reproduce

- name: Install needed for entrypoint of localcluster
  hosts: linux_entrypoint
  tags: first_run
  roles:
    - role: monolithprojects.github_actions_runner
      vars:
        github_account: "{{ secrets.git_account }}"
        github_repo: "{{ secrets.infra_repo }}"
        access_token: "{{ secrets.git_token }}"
        runner_labels: [ local-linux_entrypoint ]

Expected Results

Reinstalled github actions

Actual Results

Error
@mihalt mihalt added the bug Something isn't working label Apr 19, 2024
@mihalt
Copy link
Author

mihalt commented May 6, 2024

This command have helped

./config.sh remove --local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant