ansible-gitea-management/tasks/gitea/install.yml
2024-03-22 20:09:05 -07:00

83 lines
1.6 KiB
YAML

---
# Install gitea
# name: "Installing Gitea from COPR"
# dnf:
# name: gitea
# state: present
# Install web front end
# name: "Installing httpd package and configuration"
# dnf:
# name: gitea-httpd
# state: present
# when:
# - gitea_web_install == "httpd"
# - gitea_web_config|bool
# name: "Installing nginx package and configuration"
# dnf:
# name: gitea-nginx
# state: present
# when:
# - gitea_web_install == "nginx"
# - gitea_web_config|bool
# name: "Installing caddy package and configuration"
# dnf:
# name: gitea-caddy
# state: present
# when:
# - gitea_web_install == "caddy"
# - gitea_web_config|bool
- name: "Install httpd"
ansible.builtin.dnf:
name: httpd
state: present
when:
- gitea_web_install == "httpd"
- gitea_web_config|bool
- name: "Start and enable httpd"
ansible.builtin.systemd:
name: httpd.service
enabled: true
state: started
when:
- gitea_web_install == "httpd"
- gitea_web_config|bool
- name: "Deploy httpd"
ansible.builtin.template:
src: etc/httpd/conf.d/gitea.conf.j2
dest: /etc/httpd/conf.d/gitea.conf
owner: root
group: root
mode: '0644'
when:
- gitea_web_install == "httpd"
- gitea_web_config|bool
notify:
- restart_httpd
# Setup CSS Themes
- name:
ansible.builtin.file:
path: "/var/lib/gitea/custom/public/css"
owner: git
group: git
mode: '0755'
state: directory
recurse: true
# Setup Assets
- name:
ansible.builtin.file:
path: "/var/lib/gitea/custom/public/assets/img"
owner: git
group: git
mode: '0755'
state: directory
recurse: true
...