mirror of
https://github.com/schnidrig/openhab-ansible
synced 2026-01-12 00:48:46 +01:00
initial commit
This commit is contained in:
28
replace_default_config_with_git_repo.yml
Normal file
28
replace_default_config_with_git_repo.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user