--- - hosts: controller become: true tasks: - name: stop openhab service: name=openhab state=stopped - name: delete default config file: path: "/etc/openhab" state: absent - name: create config dir file: path: "/etc/openhab" owner: pi group: pi state: directory - name: clone config repo git: repo: "{{vault_openhab_config_repo}}" dest: "/etc/openhab" accept_hostkey: true update: no clone: yes become: false - name: start openhab service: name=openhab state=started