No description
Find a file
2025-10-06 22:23:29 +00:00
defaults update common format, update readme, update default values 2025-10-06 22:23:29 +00:00
meta abstract generic user code into a common shared role, role still needs to be renamed 2023-08-24 05:57:48 +00:00
tasks update common format, update readme, update default values 2025-10-06 22:23:29 +00:00
templates update common format, update readme, update default values 2025-10-06 22:23:29 +00:00
.gitignore update common format, update readme, update default values 2025-10-06 22:23:29 +00:00
README.md update common format, update readme, update default values 2025-10-06 22:23:29 +00:00

ansible-roles-gitea

This role is designed to deploy uptime kuma as a standalone podman container

Task Configuration

Define gitea_url, this will useful in conjunction with a proxy role such as traefik or nginx

Define gitea_path if the container user has a custom homedir such as something under /srv..

There are several other values that should be defined and secured vial ansible vault

  • gitea_db_pass
  • gitea_mail_pass
- name: Setup proxy and service
  hosts: somehost
  become: true
  roles:
    - role: gitea
      gitea_url: gitea.somehost.somewhere
      gitea_enable_openid_signin: true
      gitea_enable_openid_signup: true
      gitea_mail_outgoing_enable: true
      gitea_mail_outgoing_port: 587
      gitea_mail_outgoing_host: mail.somehost.somewhere
      gitea_mail_outgoing_user: git@somehost.somewhere
      gitea_mail_outgoing_pass: "{{ gitea_mail_pass }}"
      gitea_mail_incoming_enabled: true
      gitea_mail_incoming_tls: true
      gitea_mail_incoming_reply_to: git+%{token}@somehost.somewhere
      gitea_mail_incoming_host: mail.somehost.somewhere
      gitea_mail_incoming_port: 143
      gitea_mail_incoming_user: git@somehost.somewhere
      gitea_mail_incoming_pass: "{{ gitea_mail_pass }}"
    - role: traefik
      traefik_routes:
        - name: gitea
          host: "{{ gitea_url }}"
          srv: "{{ traefik_host_address }}:3001"
    - role: firewalld
      firewalld_add:
        - name: public
          services:
            - http
            - https
          forwards:
            - port: 80
              to: 8080
            - port: 443
              to: 8443

Deployment and Removal

Sometimes you need to manually stop the running containers to get a clean run when re-deploying Services must be stopped as the respecitve user or another means to aquire the correct user scope for systemd

systemctl --user stop container-traefik.service
systemctl --user stop container-gitea.service

Deploy

ansible-playbook -i hosts site.yml --tags=firewalld,traefik,gitea --limit=somehost

Remove

ansible-playbook -i hosts site.yml --tags=firewalld,traefik,gitea --extra-vars "container_state=absent firewall_action=remove" --limit=somehost