--- - setup: tags: galera - name: Copy galera template template: src: galera.cnf.j2 dest: /opt/galera.cnf owner: root group: root mode: '0644' remote_src: no tags: galera - name: Galera template fix shell: sed -i "s/ /,/g;s/ 1/1/g;s/ "/"/g" /opt/galera.cnf #- name: set mysql options fact # set_fact: # extra_docker_options: "--wsrep-new-cluster" # when: ansible_hostname == 'worker1' - name: Copy Dockerfile template template: src: Dockerfile.j2 dest: /opt/Dockerfile remote_src: no #- name: Build 'swarm-galera' image # docker_image: # name: 'swarm-galera' # build: # path: / # tag: v1 # source: build - name: Build image from Dockerfile shell: docker build -t ubuntu:galera-node-{{ ansible_hostname }} . args: chdir: /opt