Fix pre-commit hooks and move directories
roles/ and inventory/ are now in playbooks/ also fixed issues reported by ansible-lint
This commit is contained in:
		
							parent
							
								
									dc398ddb6e
								
							
						
					
					
						commit
						4104057771
					
				
					 123 changed files with 91 additions and 39 deletions
				
			
		
							
								
								
									
										27
									
								
								playbooks/roles/vikunja/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								playbooks/roles/vikunja/tasks/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| --- | ||||
| - name: Set common facts | ||||
|   ansible.builtin.import_tasks: tasks/set-default-facts.yml | ||||
| 
 | ||||
| - name: Deploy {{ role_name }} | ||||
|   vars: | ||||
|     svc: "{{ vikunja_svc }}" | ||||
|     yml: "{{ vikunja_yml }}" | ||||
|     compose: "{{ vikunja_compose }}" | ||||
|   block: | ||||
|     - name: Import prepare tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/prepare-common-service.yml | ||||
| 
 | ||||
|     - name: Template config | ||||
|       ansible.builtin.template: | ||||
|         src: yml.j2 | ||||
|         dest: "{{ (service_path, 'config.yml') | path_join }}" | ||||
|         mode: "0644" | ||||
|       register: cmd_result | ||||
| 
 | ||||
|     - name: Set the docker force-recreate flag | ||||
|       ansible.builtin.set_fact: | ||||
|         docker_force_recreate: --force-recreate | ||||
|       when: cmd_result.changed # noqa: no-handler We need to handle the restart per service. Handlers don't support variables. | ||||
| 
 | ||||
|     - name: Import start tasks for common service | ||||
|       ansible.builtin.import_tasks: tasks/start-common-service.yml | ||||
							
								
								
									
										58
									
								
								playbooks/roles/vikunja/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								playbooks/roles/vikunja/vars/main.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,58 @@ | |||
| --- | ||||
| vikunja_svc: | ||||
|   domain: todo.serguzim.me | ||||
|   port: 3456 | ||||
|   db: | ||||
|     host: "{{ postgres.host }}" | ||||
|     port: "{{ postgres.port }}" | ||||
|     user: "{{ opentofu.postgresql_data.vikunja.user }}" | ||||
|     pass: "{{ opentofu.postgresql_data.vikunja.pass }}" | ||||
|     database: "{{ opentofu.postgresql_data.vikunja.database }}" | ||||
| 
 | ||||
| vikunja_yml: | ||||
|   service: | ||||
|     JWTSecret: "{{ vault_vikunja.jwt_secret }}" | ||||
|     frontendurl: https://{{ svc.domain }} | ||||
|     enableregistration: false | ||||
|     timezone: "{{ timezone }}" | ||||
| 
 | ||||
|   database: | ||||
|     type: postgres | ||||
|     sslmode: verify-full | ||||
|     host: "{{ svc.db.host }}" | ||||
|     database: "{{ svc.db.database }}" | ||||
|     user: "{{ svc.db.user }}" | ||||
|     password: "{{ svc.db.pass }}" | ||||
| 
 | ||||
|   mailer: | ||||
|     enabled: true | ||||
|     host: "{{ mailer.host }}" | ||||
|     port: "{{ mailer.port }}" | ||||
|     username: "{{ vault_vikunja.mailer.user }}" | ||||
|     password: "{{ vault_vikunja.mailer.pass }}" | ||||
|     fromemail: "{{ vault_vikunja.mailer.user }}" | ||||
| 
 | ||||
|   auth: | ||||
|     local: | ||||
|       enabled: false | ||||
|     openid: | ||||
|       enabled: true | ||||
|       providers: | ||||
|         - name: auth.serguzim.me | ||||
|           authurl: "{{ opentofu.authentik_data.vikunja.base_url }}/" | ||||
|           logouturl: "{{ (opentofu.authentik_data.vikunja.base_url, 'end-session') | path_join }}" | ||||
|           clientid: "{{ opentofu.authentik_data.vikunja.client_id }}" | ||||
|           clientsecret: "{{ opentofu.authentik_data.vikunja.client_secret }}" | ||||
| 
 | ||||
|   metrics: | ||||
|     enabled: true | ||||
| 
 | ||||
| vikunja_compose: | ||||
|   watchtower: true | ||||
|   image: vikunja/vikunja | ||||
|   volumes: | ||||
|     - data:/app/vikunja/files | ||||
|     - ./config.yml:/app/vikunja/config.yml | ||||
|   file: | ||||
|     volumes: | ||||
|       data: | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue