ansible-gitea-management/tasks/gitea/install.yml

73 lines
1.4 KiB
YAML
Raw Normal View History

2022-03-04 05:15:25 +00:00
---
# Install gitea
2022-03-28 00:53:47 +00:00
# name: "Installing Gitea from COPR"
# dnf:
# name: gitea
# state: present
2022-03-04 05:15:25 +00:00
# Install web front end
2022-03-28 00:53:47 +00:00
# name: "Installing httpd package and configuration"
# dnf:
# name: gitea-httpd
# state: present
# when:
# - gitea_web_install == "httpd"
# - gitea_web_config|bool
2022-03-04 05:15:25 +00:00
2022-03-28 00:53:47 +00:00
# name: "Installing nginx package and configuration"
# dnf:
# name: gitea-nginx
# state: present
# when:
# - gitea_web_install == "nginx"
# - gitea_web_config|bool
2022-03-04 05:15:25 +00:00
2022-03-28 00:53:47 +00:00
# name: "Installing caddy package and configuration"
# dnf:
# name: gitea-caddy
# state: present
# when:
# - gitea_web_install == "caddy"
# - gitea_web_config|bool
2022-03-04 05:15:25 +00:00
2022-06-04 02:33:48 +00:00
- name: "Install httpd"
2022-11-08 22:18:02 +00:00
ansible.builtin.dnf:
2022-06-04 02:33:48 +00:00
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
2022-03-04 05:15:25 +00:00
# Setup CSS Themes
- name:
2022-03-28 00:53:47 +00:00
ansible.builtin.file:
2022-03-04 05:15:25 +00:00
path: "/var/lib/gitea/custom/public/css"
owner: git
group: git
mode: '0755'
state: directory
recurse: true
...