|
|
|
@ -42,6 +42,25 @@
|
|
|
|
|
virtualenv_command: virtualenv
|
|
|
|
|
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
|
|
|
|
|
template:
|
|
|
|
|
src: config.yaml
|
|
|
|
|