From 8db26ab33e769402fa8bc7a15d5fec4a2b32bd1b Mon Sep 17 00:00:00 2001 From: Yi-Ting Shih Date: Mon, 7 Apr 2025 20:37:36 +0800 Subject: [PATCH] Feat(workflows): add lint --- .gitea/workflows/lint.yml | 17 +++++++++++++++++ playbooks/judgehost.yml | 4 ++-- .../tasks/configure.yml | 3 +++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/lint.yml diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..1806933 --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -0,0 +1,17 @@ +name: Ansible Playbook lint +on: [push] + +jobs: + ansible-lint: + runs-on: imgbuilder + container: + image: gitea.konchin.com/image/ansible + credentials: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_PASSWORD }} + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Ansible Lint + run: | + ansible-lint playbooks/ roles/ diff --git a/playbooks/judgehost.yml b/playbooks/judgehost.yml index 43f8769..4390964 100644 --- a/playbooks/judgehost.yml +++ b/playbooks/judgehost.yml @@ -2,6 +2,6 @@ - name: Install judgehost hosts: judgehost roles: - #- role: install_packages_debian - #- role: configure_judgehost_legacy + # - role: install_packages_debian + # - role: configure_judgehost_legacy - role: configure_judgehost diff --git a/roles/configure_judgehost_legacy/tasks/configure.yml b/roles/configure_judgehost_legacy/tasks/configure.yml index 0cda5a4..ea7c62f 100644 --- a/roles/configure_judgehost_legacy/tasks/configure.yml +++ b/roles/configure_judgehost_legacy/tasks/configure.yml @@ -24,6 +24,7 @@ chdir: "{{ domjudge_base_dir }}" become: true become_user: domjudge + changed_when: true register: debug - name: Debug tags: [make] @@ -38,6 +39,7 @@ chdir: "{{ domjudge_base_dir }}" notify: - Systemd daemon-reload + changed_when: true register: debug - name: Debug tags: [make] @@ -80,6 +82,7 @@ ./misc-tools/dj_make_chroot args: chdir: "{{ domjudge_base_dir }}" + changed_when: true - name: Modify boot options ansible.builtin.lineinfile: