Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion act_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- name: Gather subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: wzzrd.gitea.act
3 changes: 1 addition & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
### REQUIRED
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric lowercase characters and underscores. Namespaces cannot start with
Expand All @@ -18,7 +19,6 @@ readme: README.md
authors:
- Maxim Burgerhout <[email protected]>


### OPTIONAL but strongly recommended
# A short summary description of the collection
description: A collection to configure a private Gitea instance and act_runners
Expand All @@ -41,7 +41,6 @@ tags:
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version
# range specifiers can be set and are separated by ','
dependencies: {}

# The URL of the originating SCM repository
repository: https://github.com/wzzrd/ansible-collection-gitea

Expand Down
2 changes: 1 addition & 1 deletion gitea_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- name: Gather subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: wzzrd.gitea.gitea
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Collections must specify a minimum required ansible version to upload
# to galaxy
requires_ansible: '>=2.15.0'
requires_ansible: ">=2.15.0"

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
Expand Down
5 changes: 3 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Fail if runner or server groups are missing
hosts: localhost
tasks:
Expand All @@ -16,7 +17,7 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"
- default_ipv4

roles:
Expand Down Expand Up @@ -44,6 +45,6 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"
roles:
- role: act
16 changes: 8 additions & 8 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
networks:
- name: "gitea"
- name: gitea
- name: ubi9_runner
image: registry.access.redhat.com/ubi9/ubi-init
pre_built_image: true
Expand All @@ -26,10 +26,10 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
networks:
- name: "gitea"
- name: gitea
- name: ubi8_server
image: registry.access.redhat.com/ubi8/ubi-init
pre_built_image: true
Expand All @@ -41,10 +41,10 @@ platforms:
published_ports:
- 3000/tcp
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
networks:
- name: "gitea"
- name: gitea
- name: ubi9_server
image: registry.access.redhat.com/ubi9/ubi-init
pre_built_image: true
Expand All @@ -56,10 +56,10 @@ platforms:
published_ports:
- 3000/tcp
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
networks:
- name: "gitea"
- name: gitea
provisioner:
name: ansible
env:
Expand Down
1 change: 1 addition & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Prepare servers for molecule tests
hosts: servers:runners
gather_facts: false
Expand Down
1 change: 1 addition & 0 deletions molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
collections:
- containers.podman
- community.general
5 changes: 2 additions & 3 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Verify
hosts: runners
gather_facts: false
Expand All @@ -15,12 +16,11 @@
that:
- act_runner_stat_result.stat.exists


- name: Check if gitea configfile exists
block:
- name: Check for existence of /home/builder/config.yaml
ansible.builtin.stat:
path: "/home/act_runner/config.yaml"
path: /home/act_runner/config.yaml
register: act_runner_config_stat_result

- name: Verify result of previous task
Expand Down Expand Up @@ -59,7 +59,6 @@
that:
- gitea_stat_result.stat.exists


- name: Check if gitea configfile exists
block:
- name: Check for existence of /etc/gitea/gitea.ini
Expand Down
8 changes: 4 additions & 4 deletions roles/act/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
act_install_dependencies: true
act_user: act_runner
act_user_group: act_runner
act_user_additional_groups: ''
act_user_additional_groups: ""
act_user_home: /home/{{ act_user }}

act_bin_dir: /usr/local/bin
act_bin_owner: root
act_bin_owner_group: root

act_runner_version: "0.2.6"
act_download_dir_url: "https://dl.gitea.com/act_runner/{{ act_runner_version }}"
act_download_dir_url: https://dl.gitea.com/act_runner/{{ act_runner_version }}
# An empty value for act_config_content will generate a default config.yaml
act_config_content: ''
act_config_content: ""

act_gitea_config_path: /etc/gitea/gitea.ini
act_do_register: false
# For a scoped runner, enter owner/repo, for global runner leave as ''
act_scope: ''
act_scope: ""

act_gitea_host: gitea.example.com
act_gitea_host_port: 443
Expand Down
4 changes: 2 additions & 2 deletions roles/act/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- name: "Restart act_runner"
- name: Restart act_runner
ansible.builtin.service:
name: act_runner
state: restarted

- name: "Reload systemd"
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
5 changes: 3 additions & 2 deletions roles/act/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
galaxy_info:
author: Maxim Burgerhout
description: Configure an act_runner instance for a Gitea server
Expand All @@ -11,10 +12,10 @@ galaxy_info:
min_ansible_version: "2.13"

platforms:
- name: "Fedora"
- name: Fedora
versions:
- all
- name: "EL"
- name: EL
versions:
- "8"
- "9"
Expand Down
3 changes: 2 additions & 1 deletion roles/act/molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Converge
hosts: all
# We disable gather facts because it would fail due to our container not
Expand All @@ -9,7 +10,7 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: act
4 changes: 2 additions & 2 deletions roles/act/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
- name: ubi9
image: registry.access.redhat.com/ubi9/ubi-init:latest
Expand All @@ -20,7 +20,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
provisioner:
name: ansible
Expand Down
1 change: 1 addition & 0 deletions roles/act/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Prepare containers for molecule tests
hosts: all
gather_facts: false
Expand Down
1 change: 1 addition & 0 deletions roles/act/molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
collections:
- containers.podman
4 changes: 2 additions & 2 deletions roles/act/molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Verify
hosts: all
# We disable gather facts because it would fail due to our container not
Expand All @@ -19,12 +20,11 @@
that:
- act_runner_stat_result.stat.exists


- name: Check if gitea configfile exists
block:
- name: Check for existence of /home/builder/config.yaml
ansible.builtin.stat:
path: "/home/act_runner/config.yaml"
path: /home/act_runner/config.yaml
register: act_runner_config_stat_result

- name: Verify result of previous task
Expand Down
5 changes: 3 additions & 2 deletions roles/act/molecule/update/converge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Converge act_runner 0.2.6
hosts: all
gather_facts: false
Expand All @@ -7,7 +8,7 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: act
Expand All @@ -21,7 +22,7 @@
- name: Gather required subset of facts
ansible.builtin.setup:
gather_subset:
- '!all'
- "!all"

roles:
- role: act
4 changes: 2 additions & 2 deletions roles/act/molecule/update/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
- name: ubi9
image: registry.access.redhat.com/ubi9/ubi-init
Expand All @@ -20,7 +20,7 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
command: "/usr/sbin/init"
command: /usr/sbin/init
platform: linux/amd64
provisioner:
name: ansible
Expand Down
1 change: 1 addition & 0 deletions roles/act/molecule/update/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Prepare containers for molecule tests
hosts: all
gather_facts: false
Expand Down
1 change: 1 addition & 0 deletions roles/act/molecule/update/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
collections:
- containers.podman
- community.general
1 change: 1 addition & 0 deletions roles/act/molecule/update/verify.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
- name: Verify
hosts: all
# We disable gather facts because it would fail due to our container not
Expand Down
Loading