- hosts: hash tasks: - become: yes name: mkdir /etc/docker-service/loki file: path: /etc/docker-service/loki state: directory - become: yes name: cp /etc/docker-service/loki/loki-config.yaml register: config copy: src: loki-config.yaml dest: /etc/docker-service/loki/loki-config.yaml # - shell: docker kill --signal HUP loki # when: config.changed