Make the certificates directory instead of finding it
This commit is contained in:
		| @@ -74,21 +74,15 @@ | |||||||
|   loop: '{{ ensure_dovecot.seboolean_list }}' |   loop: '{{ ensure_dovecot.seboolean_list }}' | ||||||
|   loop_control: |   loop_control: | ||||||
|     label: '{{ item.name }} will be {{ item.state }}' |     label: '{{ item.name }} will be {{ item.state }}' | ||||||
| - name: 'find certificates' | - name: 'mkdir certificates' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
|     - ensure_dovecot is defined |     - ensure_dovecot is defined | ||||||
|     - ensure_dovecot.template_list is defined |     - ensure_dovecot.template_list is defined | ||||||
|     - ensure_dovecot.template_list is iterable |     - ensure_dovecot.template_list is iterable | ||||||
|   ansible.builtin.find: |   ansible.builtin.file: | ||||||
|     file_type: 'file' |     path: '/etc/dovecot/certificates' | ||||||
|     paths: |     state: 'directory' | ||||||
|       - '/etc/httpd/md/domains/' |  | ||||||
|     patterns: |  | ||||||
|       - 'pubcert.pem' |  | ||||||
|       - 'privkey.pem' |  | ||||||
|     recurse: 'yes' |  | ||||||
|   register: 'certificates' |  | ||||||
| - name: 'ensure configurations' | - name: 'ensure configurations' | ||||||
|   when: |   when: | ||||||
|     - ansible_system == 'Linux' |     - ansible_system == 'Linux' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user