1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-05 17:36:08 +02:00
infrastructure/roles/quassel/tasks/main.yml
Kristian Klausen 4112bdf9fd Make ansible-lint happy
yaml: truthy value should be one of [false, true] (truthy)
yaml: wrong indentation: expected 4 but found 2 (indentation)
yaml: too few spaces before comment (comments)
yaml: missing starting space in comment (comments)
yaml: too many blank lines (1 > 0) (empty-lines)
yaml: too many spaces after colon (colons)
yaml: comment not indented like content (comments-indentation)
yaml: no new line character at the end of file (new-line-at-end-of-file)
load-failure: Failed to load or parse file
parser-error: couldn't resolve module/action 'hosts'. This often indicates a misspelling, missing collection, or incorrect module path.
2021-02-14 14:22:05 +01:00

67 lines
1.8 KiB
YAML

---
- name: install quassel
pacman: name=quassel-core,python-pexpect state=present
- name: add quassel postgres db
postgresql_db: db=quassel
become: true
become_user: postgres
become_method: su
- name: add quassel postgres user
postgresql_user: db=quassel name=quassel password={{ vault_postgres_users.quassel }} encrypted=true
become: true
become_user: postgres
become_method: su
- name: initialize quassel
become: true
become_user: quassel
become_method: sudo
expect:
command: quasselcore --configdir=/var/lib/quassel --select-backend=PostgreSQL
responses:
Username: ''
Password:
- '{{ vault_postgres_users.quassel }}'
- ''
- ''
- ''
Hostname: ''
Port: ''
Database: ''
creates: /var/lib/quassel/quasselcore.conf
- name: install quassel cert renewal hook
template: src=letsencrypt.hook.d.j2 dest=/etc/letsencrypt/hook.d/quassel owner=root group=root mode=0755
- name: install quassel units
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
with_items:
- clean-quassel.timer
- clean-quassel.service
notify:
- daemon reload
- name: add quassel.service.d dir
file: state=directory path=/etc/systemd/system/quassel.service.d owner=root group=root mode=0755
- name: install quassel.service snippet
copy: src=quassel.service.d dest=/etc/systemd/system/quassel.service.d/local.conf owner=root group=root mode=0644
- name: start and enable quassel
service: name={{ item }} enabled=yes state=started
with_items:
- quassel.service
- clean-quassel.timer
- name: open firewall holes
ansible.posix.firewalld: port={{ item }} permanent=true state=enabled immediate=yes
with_items:
- 4242/tcp
- 113/tcp
when: configure_firewall
tags:
- firewall