forked from CCCHH/ansible-infra
		
	fix ansible_lint issues
Use prefix for role variables, have an ending newline at the end of files and use changed_when for command. Also exclude *.sops.yaml files from ansible-lint.
This commit is contained in:
		
					parent
					
						
							
								9b8e14f3c4
							
						
					
				
			
			
				commit
				
					
						f943e95e2e
					
				
			
		
					 5 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
					@ -4,3 +4,4 @@ skip_list:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
exclude_paths:
 | 
					exclude_paths:
 | 
				
			||||||
  - .forgejo/
 | 
					  - .forgejo/
 | 
				
			||||||
 | 
					  - "**/*.sops.yaml"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,4 +6,4 @@ docker_compose__configuration_files:
 | 
				
			||||||
    content: "{{ lookup('ansible.builtin.template', 'resources/z9/yate/docker_compose/regexroute.conf.j2') }}"
 | 
					    content: "{{ lookup('ansible.builtin.template', 'resources/z9/yate/docker_compose/regexroute.conf.j2') }}"
 | 
				
			||||||
  - name: regfile.conf
 | 
					  - name: regfile.conf
 | 
				
			||||||
    content: "{{ lookup('ansible.builtin.template', 'resources/z9/yate/docker_compose/regfile.conf.j2') }}"
 | 
					    content: "{{ lookup('ansible.builtin.template', 'resources/z9/yate/docker_compose/regfile.conf.j2') }}"
 | 
				
			||||||
docker_compose__restart_cmd: "exec yate sh -c 'kill -1 1'"
 | 
					docker_compose__restart_cmd: "exec yate sh -c 'kill -1 1'"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,8 +27,8 @@
 | 
				
			||||||
            mv /etc/ssh/moduli.tmp /etc/ssh/moduli
 | 
					            mv /etc/ssh/moduli.tmp /etc/ssh/moduli
 | 
				
			||||||
            echo "ansible-changed: changed /etc/ssh/moduli"
 | 
					            echo "ansible-changed: changed /etc/ssh/moduli"
 | 
				
			||||||
          fi
 | 
					          fi
 | 
				
			||||||
      register: result
 | 
					      register: deploy_ssh_server_config__result
 | 
				
			||||||
      changed_when:
 | 
					      changed_when:
 | 
				
			||||||
        - '"ansible-changed" in result.stdout'
 | 
					        - '"ansible-changed" in deploy_ssh_server_config__result.stdout'
 | 
				
			||||||
      notify:
 | 
					      notify:
 | 
				
			||||||
        - restart the ssh service
 | 
					        - restart the ssh service
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,2 +1,2 @@
 | 
				
			||||||
docker_compose__configuration_files: [ ]
 | 
					docker_compose__configuration_files: [ ]
 | 
				
			||||||
docker_compose__restart_cmd: ""
 | 
					docker_compose__restart_cmd: ""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,4 +9,5 @@
 | 
				
			||||||
    cmd: /usr/bin/docker compose {{ docker_compose__restart_cmd }}
 | 
					    cmd: /usr/bin/docker compose {{ docker_compose__restart_cmd }}
 | 
				
			||||||
    chdir: /ansible_docker_compose
 | 
					    chdir: /ansible_docker_compose
 | 
				
			||||||
  become: true
 | 
					  become: true
 | 
				
			||||||
 | 
					  changed_when: true  # Mark this as always changed (for now?).
 | 
				
			||||||
  when: docker_compose__restart_cmd != ""
 | 
					  when: docker_compose__restart_cmd != ""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue