Add basic git repo cloning role

For websites c:
This commit is contained in:
Salt 2020-11-07 22:40:15 -06:00
parent a660f8bb06
commit 7ab0a230eb
3 changed files with 21 additions and 2 deletions

View File

@ -10,8 +10,6 @@ This branch is kinda-sorta a port of master, so it still needs to reach some for
* Matrix(? Do I still want to keep this around? Is there a better alternative? Will my friends even use it?)
* Basic git cloning for websites
* My inane desktop setups
* Which are part of the way there, mostly just need some off-the-wall stuff

12
roles/git/tasks/main.yml Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- name: clone git repos
git:
accept_hostkey: yes
depth: "{{ item.depth | default(1, true) }}"
dest: "{{ item.dest }}"
force: "{{ item.force | default(false, true) }}"
repo: "{{ item.repo }}"
version: "{{ item.version | default('HEAD', true) }}"
loop: "{{ git_repos }}"

View File

@ -65,6 +65,8 @@
ProxyPass / http://127.0.0.1:3000/ nocanon retry=1
- servername: nc.test.desu.ltd
documentroot: /var/www/html/nextcloud
- servername: test.desu.ltd
documentroot: /var/www/html/desu.ltd
become: yes
tags: [ web, apache ]
- role: php
@ -76,6 +78,13 @@
- php-pgsql # For general DB stuff
become: yes
tags: [ web, php ]
- role: git
vars:
git_repos:
- repo: https://git.9iron.club/salt/desultd
dest: /var/www/html/desu.ltd
become: yes
tags: [ web, git ]
- role: nextcloud
vars:
nextcloud_admin_user: admin