tt-rss/tasks/main.yml

53 lines
1.5 KiB
YAML
Raw Normal View History

2019-04-17 11:37:19 +00:00
- name: install tt-rss
become: yes
pacman:
name: tt-rss
state: present
- name: "Ensure database is present"
become: yes
mysql_db:
name: "{{ ttrss_db_name }}"
collation: utf8_general_ci
encoding: utf8
2019-04-19 17:58:52 +00:00
state: present
2019-04-17 11:37:19 +00:00
- name: "Ensure db user is present"
become: yes
mysql_user:
name: "{{ ttrss_db_user }}"
host: localhost
password: "{{ ttrss_db_password }}"
priv: "{{ ttrss_db_name }}.*:ALL"
state: present
- name: link tt-rss folder to WWW
become: yes
file:
src: /usr/share/webapps/tt-rss
dest: "{{ttrss_install_path}}"
state: link
- name: Ensure config.php is present
template:
src: config.php.j2
dest: /etc/webapps/tt-rss/config.php
become: yes
- name: copy failtoban config
template:
src: fail2ban/tt-rss.local.j2
dest: /etc/fail2ban/jail.d/tt-rss.local
notify: restart fail2ban
become: yes
- name: enable daemon
service:
name: tt-rss # required. Name of the service.
enabled: true # not required. Whether the service should start on boot. B(At least one of state and enabled are required.)
state: started # not required. choices: reloaded;restarted;started;stopped. C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. C(restarted) will always bounce the service. C(reloaded) will always reload. B(At least one of state and enabled are required.) Note that reloaded will start the service if it is not already started, even if your chosen init system wouldn't normally.
become: yes