# Copyright (c) 2021 Red Hat, Inc.
#
# Author:
#  Cleber Rosa <crosa@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later.  See the COPYING file in the top-level directory.
#
# This is an ansible playbook file.  Run it to set up systems with the
# gitlab-runner agent.
---
- name: Installation of gitlab-runner
  hosts: all
  vars_files:
    - vars.yml
  tasks:
    - debug:
        msg: 'Checking for a valid GitLab registration token'
      failed_when: "gitlab_runner_registration_token == 'PLEASE_PROVIDE_A_VALID_TOKEN'"

    - name: Create a group for the gitlab-runner service
      group:
        name: gitlab-runner

    - name: Create a user for the gitlab-runner service
      user:
        user: gitlab-runner
        group: gitlab-runner
        comment: GitLab Runner
        home: /home/gitlab-runner
        shell: /bin/bash

    - name: Remove the .bash_logout file when on Ubuntu systems
      file:
        path: /home/gitlab-runner/.bash_logout
        state: absent
      when: "ansible_facts['distribution'] == 'Ubuntu'"

    - name: Set the Operating System for gitlab-runner
      set_fact:
        gitlab_runner_os: "{{ ansible_facts[\"system\"]|lower }}"
    - debug:
        msg: gitlab-runner OS is {{ gitlab_runner_os }}

    - name: Set the architecture for gitlab-runner
      set_fact:
        gitlab_runner_arch: "{{ ansible_to_gitlab_arch[ansible_facts[\"architecture\"]] }}"
    - debug:
        msg: gitlab-runner arch is {{ gitlab_runner_arch }}

    - name: Download the matching gitlab-runner (DEB)
      get_url:
        dest: "/root/"
        url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{ gitlab_runner_arch }}.deb"
      when:
        - ansible_facts['distribution'] == 'Ubuntu'

    - name: Download the matching gitlab-runner (RPM)
      get_url:
        dest: "/root/"
        url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
      when:
        - ansible_facts['distribution'] == 'CentOS'

    - name: Install gitlab-runner via package manager (DEB)
      apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb"
      when:
        - ansible_facts['distribution'] == 'Ubuntu'

    - name: Install gitlab-runner via package manager (RPM)
      yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm"
      when:
        - ansible_facts['distribution'] == 'CentOS'

    - name: Register the gitlab-runner
      command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list {{ ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"

    # The secondary runner will still run under the single gitlab-runner service
    - name: Register secondary gitlab-runner
      command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list aarch32,{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"
      when:
        - ansible_facts['distribution'] == 'Ubuntu'
        - ansible_facts['architecture'] == 'aarch64'
        - ansible_facts['distribution_version'] == '22.04'

    - name: Install the gitlab-runner service using its own functionality
      command: "/usr/bin/gitlab-runner install --user gitlab-runner --working-directory /home/gitlab-runner"
      register: gitlab_runner_install_service_result
      failed_when: "gitlab_runner_install_service_result.rc != 0 and \"already exists\" not in gitlab_runner_install_service_result.stderr"

    - name: Enable the gitlab-runner service
      service:
        name: gitlab-runner
        state: started
        enabled: yes
