You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
596 B

---
- name: Create the base repo directory
file:
path: /var/lib/tildes-wiki
state: directory
owner: "{{ app_username }}"
group: "{{ app_username }}"
mode: 0775
- name: Check if a wiki git repo exists
stat:
path: /var/lib/tildes-wiki/.git
register: wiki_repo
- name: Create a git repo and initial commit
become_user: "{{ app_username }}"
shell:
cmd: |
git init
git config user.name "Tildes"
git config user.email "Tildes"
git commit --allow-empty -m "Initial commit"
chdir: /var/lib/tildes-wiki
when: not wiki_repo.stat.exists