aboutsummaryrefslogtreecommitdiff
path: root/roles/cgit/tasks
diff options
context:
space:
mode:
authorMiguel Dalberto Pedro <miguel.pedro@precisioninno.com>2026-10-29 12:48:06 -0300
committerMiguel Dalberto Pedro <miguel.pedro@precisioninno.com>2026-10-29 12:48:06 -0300
commit4b7379914a1865f07b2c54252234cc90158fc253 (patch)
treea476c7e08bb994034d7d04b5b1cdfce216f49c43 /roles/cgit/tasks
downloadmy-infra-4b7379914a1865f07b2c54252234cc90158fc253.tar.gz
my-infra-4b7379914a1865f07b2c54252234cc90158fc253.zip
feat(iac): establish Ansible baseline for Nginx, SearXNG, Valkey, and Certbot
- Reverse-engineer live Debian 13 (trixie) VPS state at miguelpedro.xyz.br - Add modular Ansible roles: common, certbot, valkey, searxng, and nginx - Encrypt SearXNG secret_key using ansible-vault in group_vars/all/vault.yml - Cleanly remove unused example.com Nginx stub symlink (sites-enabled/miguelpedro.xyz.br) - Scaffold cgit + fcgiwrap role (cgit_enabled: false) for upcoming deployment - Add DISCOVERY_REPORT.md, COMMAND_LOG.md, README.md, and AGENT_INSTRUCTIONS.md with Self-Updating Protocol
Diffstat (limited to 'roles/cgit/tasks')
-rw-r--r--roles/cgit/tasks/main.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
new file mode 100644
index 0000000..44f9459
--- /dev/null
+++ b/roles/cgit/tasks/main.yml
@@ -0,0 +1,47 @@
+---
+- name: Install cgit and FastCGI dependencies
+ ansible.builtin.apt:
+ name:
+ - cgit
+ - fcgiwrap
+ - python3-pygments
+ - python3-markdown
+ state: present
+
+- name: Ensure Git repositories root directory exists
+ ansible.builtin.file:
+ path: "{{ cgit_repos_path }}"
+ state: directory
+ owner: www-data
+ group: www-data
+ mode: "0755"
+
+- name: Deploy /etc/cgitrc configuration
+ ansible.builtin.template:
+ src: cgitrc.j2
+ dest: /etc/cgitrc
+ owner: root
+ group: root
+ mode: "0644"
+
+- name: Ensure fcgiwrap socket/service is enabled and running
+ ansible.builtin.systemd:
+ name: fcgiwrap.socket
+ enabled: true
+ state: started
+
+- name: Deploy Nginx virtual host for cgit
+ ansible.builtin.template:
+ src: site-cgit.conf.j2
+ dest: /etc/nginx/sites-available/cgit.conf
+ owner: root
+ group: root
+ mode: "0644"
+ notify: Reload nginx
+
+- name: Enable Nginx virtual host for cgit
+ ansible.builtin.file:
+ src: /etc/nginx/sites-available/cgit.conf
+ dest: /etc/nginx/sites-enabled/cgit.conf
+ state: link
+ notify: Reload nginx