Initial commit with previous code

This commit is contained in:
Antonio J. Delgado 2022-10-11 10:19:11 +03:00
commit 062f2e7acf
5 changed files with 39 additions and 0 deletions

5
defaults/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
# Default values for variables of the role
# variable_name: value
signal_data_folder: /var/lib/signal_api
signal_api_port: 8080

3
handlers/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
# - name: Refresh aliases
# shell: newaliases

21
tasks/configure.yml Normal file
View file

@ -0,0 +1,21 @@
---
- name: Ensure Signal API container is running
containers.podman.podman_container:
name: signal-api
image: bbernhard/signal-cli-rest-api
state: started
recreate: false
restart_policy: always
publish:
- "{{ signal_api_port }}:{{ signal_api_port }}"
volume:
- "{{ signal_data_folder }}:/home/.local/share/signal-cli"
env:
MODE: native
PORT: "{{ signal_api_port }}"
#AUTO_RECEIVE_SCHEDULE: "0 22 * * *"
- name: Ensure UFW allow traffic to exposed port
ufw:
rule: allow
to_port: "{{ signal_api_port }}"

5
tasks/install.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: Ensure software is installed
package:
name:
- podman

5
tasks/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: Ensure installation
include_tasks: install.yml
- name: Ensure configuration
include_tasks: configure.yml