MonolithProjects / ansible-github_actions_runner

Ansible Role to deploy GitHub Actions self-hosted runner
https://galaxy.ansible.com/ui/standalone/roles/monolithprojects/github_actions_runner/
MIT License
189 stars 77 forks source link

bug: Can't recreate runner #198

Open mihalt opened 7 months ago

mihalt commented 7 months ago

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 https://github.com/MonolithProjects/ansible-github_actions_runner/blob/1662b2980f21b02c5e480d0ac82cc2c7fd768085/tasks/install_runner.yml#L66-L84

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 commented 6 months ago

This command have helped

./config.sh remove --local