try to read var from config
This commit is contained in:
parent
00c2ce7443
commit
61a9070108
1 changed files with 19 additions and 0 deletions
|
@ -42,6 +42,25 @@
|
||||||
virtualenv_command: virtualenv
|
virtualenv_command: virtualenv
|
||||||
virtualenv_python: /usr/bin/python3
|
virtualenv_python: /usr/bin/python3
|
||||||
|
|
||||||
|
- name: Check if the bridge is already configured
|
||||||
|
stat:
|
||||||
|
path: /opt/mautrix-facebook/config.yaml
|
||||||
|
register: register_config
|
||||||
|
|
||||||
|
- name: Set read token variable
|
||||||
|
block:
|
||||||
|
- name: read config file
|
||||||
|
slurp:
|
||||||
|
src: /opt/mautrix-facebook/config.yaml
|
||||||
|
register: encoded_facebook_config
|
||||||
|
- name: decode config file
|
||||||
|
set_fact:
|
||||||
|
facebook_config: "{{ encoded_facebook_config.content | b64decode | from_yaml }}"
|
||||||
|
- name: print config
|
||||||
|
debug:
|
||||||
|
msg: "{{ facebook_config }}"
|
||||||
|
when: register_config.stat.exists
|
||||||
|
|
||||||
- name: Configure the bridge
|
- name: Configure the bridge
|
||||||
template:
|
template:
|
||||||
src: config.yaml
|
src: config.yaml
|
||||||
|
|
Loading…
Reference in a new issue