Automate light server
Co-authored-by: J <j@jsts.xyz>
This commit is contained in:
		
					parent
					
						
							
								aefdd123a4
							
						
					
				
			
			
				commit
				
					
						e74a50e873
					
				
			
		
					 40 changed files with 401 additions and 10 deletions
				
			
		|  | @ -2,7 +2,21 @@ | |||
| argument_specs: | ||||
|   main: | ||||
|     options: | ||||
|       ola__enable_ftdi: | ||||
|         description: Enable FTDI USB DMX support | ||||
|         type: bool | ||||
|       ola__configs: | ||||
|         description: A list of ola configurations. | ||||
|         type: list | ||||
|         elements: dict | ||||
|         required: true | ||||
|         options: | ||||
|           name: | ||||
|             description: >- | ||||
|               The name of the configuration file, where the configuration should | ||||
|               be deployed to. The file will be placed under `/etc/ola/` and | ||||
|               `.conf` will be appended to the given name. So in the end the path | ||||
|               will be like this: `/etc/ola/\{\ name \}\}.conf`. | ||||
|             type: str | ||||
|             required: true | ||||
|           content: | ||||
|             description: The content of the configuration. | ||||
|             type: str | ||||
|             required: true | ||||
|  |  | |||
|  | @ -1,13 +1,15 @@ | |||
| - name: Install ola | ||||
|   ansible.builtin.apt: | ||||
|     name: ola | ||||
| - name: Generate ola-ftdidmx.conf | ||||
|   ansible.builtin.template: | ||||
|     src: ola-ftdidmx.conf.j2 | ||||
|     dest: /etc/ola/ola-ftdidmx.conf | ||||
|     mode: "0664" | ||||
| - name: Ensure all given configuraton files are deployed | ||||
|   ansible.builtin.copy: | ||||
|     content: "{{ item.content }}" | ||||
|     dest: /etc/ola/{{ item.name }}.conf | ||||
|     mode: 0644 | ||||
|     owner: olad | ||||
|     group: olad | ||||
|   loop: "{{ ola__configs }}" | ||||
|   notify: Restart olad | ||||
| - name: Enable and start ola service | ||||
|   ansible.builtin.systemd: | ||||
|     name: olad.service | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue