mirror of
				https://git.lapiole.org/dani/ansible-roles.git
				synced 2025-10-30 18:31:28 +01:00 
			
		
		
		
	Update to 2022-03-07 14:00
This commit is contained in:
		
							
								
								
									
										4
									
								
								roles/unmaintained/wh_pmg/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								roles/unmaintained/wh_pmg/meta/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| --- | ||||
| dependencies: | ||||
|   - role: wh_common | ||||
|   - role: pmg | ||||
							
								
								
									
										4
									
								
								roles/unmaintained/wh_pmg/tasks/facts.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								roles/unmaintained/wh_pmg/tasks/facts.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| --- | ||||
|  | ||||
| - set_fact: wh_mail_domains_to_relay={{ wh_mail_domains + wh_mail_aliases | default([]) }} | ||||
|   tags: mail | ||||
							
								
								
									
										22
									
								
								roles/unmaintained/wh_pmg/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								roles/unmaintained/wh_pmg/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| --- | ||||
|  | ||||
| - include: facts.yml | ||||
|  | ||||
| - name: List configured relay domains | ||||
|   command: pmgsh get /config/domains | ||||
|   register: wh_pmg_domains | ||||
|   changed_when: False | ||||
|   tags: mail | ||||
| - set_fact: wh_pmg_domains={{ wh_pmg_domains.stdout | from_json | map(attribute='domain') | list }} | ||||
|   tags: mail | ||||
|  | ||||
| - name: Create domains in PMG relay table | ||||
|   command: pmgsh create /config/domains --domain "{{ item }}" | ||||
|   loop: "{{ wh_mail_domains_to_relay }}" | ||||
|   when: item not in wh_pmg_domains | ||||
|   tags: mail | ||||
|  | ||||
| - name: Remove domains from PMG relay table | ||||
|   command: pmgsh delete /config/domains/{{ item }} | ||||
|   loop: "{{ wh_pmg_domains }}" | ||||
|   when: item not in wh_mail_domains_to_relay | ||||
		Reference in New Issue
	
	Block a user
	 Daniel Berteaud
					Daniel Berteaud