--- - name: Update Gitea Configuration and Restart hosts: production become: no gather_facts: yes vars: gitea_stack_path: "{{ stacks_base_path }}/gitea" tasks: - name: Copy updated docker-compose.yml to production server copy: src: "{{ playbook_dir }}/../../stacks/gitea/docker-compose.yml" dest: "{{ gitea_stack_path }}/docker-compose.yml" owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: '0644' - name: Restart Gitea stack with updated configuration community.docker.docker_compose_v2: project_src: "{{ gitea_stack_path }}" state: present pull: never recreate: always remove_orphans: no register: gitea_restart - name: Wait for Gitea to be ready wait_for: timeout: 60 when: gitea_restart.changed - name: Verify Gitea Actions configuration shell: | docker exec gitea cat /data/gitea/conf/app.ini 2>/dev/null | grep -A 3 "\[actions\]" || echo "Config not accessible" register: gitea_config changed_when: false ignore_errors: yes - name: Display Gitea Actions configuration debug: msg: - "=== Gitea Configuration Update Complete ===" - "Container restarted: {{ 'Yes' if gitea_restart.changed else 'No' }}" - "" - "Current Actions configuration:" - "{{ gitea_config.stdout if gitea_config.stdout else 'Could not read config (container may still be starting)' }}" - "" - "The DEFAULT_ACTIONS_URL should now point to your Gitea instance instead of GitHub."