mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			50 lines
		
	
	
		
			991 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			991 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
---
 | 
						|
- name: Create note_kfet dir with good permissions
 | 
						|
  file:
 | 
						|
    path: /var/www/note_kfet
 | 
						|
    state: directory
 | 
						|
    owner: www-data
 | 
						|
    group: www-data
 | 
						|
    mode: u=rwx,g=rwxs,o=rx
 | 
						|
 | 
						|
- name: Clone Note Kfet
 | 
						|
  git:
 | 
						|
    repo: https://gitlab.crans.org/bde/nk20.git
 | 
						|
    dest: /var/www/note_kfet
 | 
						|
    version: beta
 | 
						|
    force: true
 | 
						|
 | 
						|
- name: Use default env vars (should be updated!)
 | 
						|
  template:
 | 
						|
    src: "env_example"
 | 
						|
    dest: "/var/www/note_kfet/.env"
 | 
						|
    mode: 0644
 | 
						|
    force: false
 | 
						|
 | 
						|
- name: Update permissions for note_kfet dir
 | 
						|
  file:
 | 
						|
    path: /var/www/note_kfet
 | 
						|
    state: directory
 | 
						|
    recurse: yes
 | 
						|
    owner: www-data
 | 
						|
    group: www-data
 | 
						|
 | 
						|
- name: Setup cron jobs
 | 
						|
  file:
 | 
						|
    src: /var/www/note_kfet/note.cron
 | 
						|
    dest: /etc/cron.d/note
 | 
						|
    state: link
 | 
						|
    owner: root
 | 
						|
    group: root
 | 
						|
 | 
						|
- name: Restart cron service
 | 
						|
  systemd:
 | 
						|
    name: cron
 | 
						|
    state: restarted
 | 
						|
 | 
						|
- name: Update permissions for the cron file
 | 
						|
  file:
 | 
						|
    path: /var/www/note_kfet/note.cron
 | 
						|
    owner: root
 | 
						|
    group: www-data
 |