- name: "Create {{ docker_glusterfs_pluginssl }}" file: path: "{{ docker_glusterfs_pluginssl }}" owner: "{{ docker_glusterfs_owner }}" group: "{{ docker_glusterfs_group }}" mode: "{{ docker_glusterfs_dirmode }}" state: directory register: docker_glusterfs_createssl - name: Copy {{ docker_glusterfs_hostssl }} to {{ docker_glusterfs_pluginssl }} ansible.builtin.copy: remote_src: true src: "{{ docker_glusterfs_hostssl }}/" dest: "{{ docker_glusterfs_pluginssl }}/" when: docker_glusterfs_createssl.changed - name: Install the SSL CA ansible.builtin.copy: remote_src: true src: "{{ docker_glusterfs_keydir }}/ca.pem" dest: "{{ docker_glusterfs_pluginssl }}/glusterfs.ca" owner: "{{ docker_glusterfs_owner }}" group: "{{ docker_glusterfs_group }}" mode: "{{ docker_glusterfs_mode }}" - name: Install the SSL certificate ansible.builtin.copy: remote_src: true src: "{{ docker_glusterfs_keydir }}/node.pem" dest: "{{ docker_glusterfs_pluginssl }}/glusterfs.pem" owner: "{{ docker_glusterfs_owner }}" group: "{{ docker_glusterfs_group }}" mode: "{{ docker_glusterfs_mode }}" - name: Install the SSL key ansible.builtin.copy: remote_src: true src: "{{ docker_glusterfs_keydir }}/node.key" dest: "{{ docker_glusterfs_pluginssl }}/glusterfs.key" owner: "{{ docker_glusterfs_owner }}" group: "{{ docker_glusterfs_group }}" mode: "{{ docker_glusterfs_mode }}" - name: Mount {{ docker_glusterfs_pluginssl }} @ {{ docker_glusterfs_hostssl }} ansible.posix.mount: path: "{{ docker_glusterfs_hostssl }}" src: "{{ docker_glusterfs_pluginssl }}" opts: bind boot: no fstype: none state: mounted # This would be one task if not for the SSL path fuckery - name: Install glusterfs-volume-plugin community.docker.docker_plugin: state: enable alias: glusterfs #https://github.com/marcelo-ochoa/docker-volume-plugins/ plugin_name: "mochoa/glusterfs-volume-plugin-aarch64" plugin_options: SERVERS: "{{ docker_glusterfs_servers }}" SECURE_MANAGEMENT: true