From 0df015e9b5c4aefd4245c94ee98021d2af80ed99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 22 Oct 2022 16:41:45 +0200 Subject: lint: pass ansible-lint + yamllint --- roles/miniflux/tasks/main.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'roles/miniflux') diff --git a/roles/miniflux/tasks/main.yml b/roles/miniflux/tasks/main.yml index 3964835..39cf807 100644 --- a/roles/miniflux/tasks/main.yml +++ b/roles/miniflux/tasks/main.yml @@ -1,47 +1,47 @@ - name: install miniflux - package: + ansible.builtin.package: name: miniflux state: present - name: include postgres user - include_role: + ansible.builtin.include_role: name: postgres tasks_from: create_user vars: postgres_db_user: "{{ miniflux_db_user }}" - name: include postgres db - include_role: + ansible.builtin.include_role: name: postgres tasks_from: create_db vars: postgres_db_user: "{{ miniflux_db_user }}" - postgres_db_name: "{{ miniflux_db_name}}{{ item }}" + postgres_db_name: "{{ miniflux_db_name }}{{ item }}" loop: - "" - 2 -- name: enable hstore extension for postgres - command: psql -U postgres miniflux -c "create extension hstore" +- name: enable hstore extension for postgres # noqa: no-changed-when + ansible.builtin.command: > + psql -U postgres miniflux -c "create extension hstore" register: result failed_when: result.rc != 0 and "already exists" not in result.stderr - name: generate configuration - template: + ansible.builtin.template: src: miniflux.conf.j2 dest: /etc/miniflux.conf owner: "{{ miniflux_user }}" - owner: "{{ miniflux_group }}" mode: 0640 -- name: run postgres migrations - shell: | +- name: run postgres migrations # noqa: no-changed-when + ansible.builtin.shell: | psql -U postgres -c "ALTER USER miniflux WITH SUPERUSER" miniflux -c /etc/miniflux.conf -migrate psql -U postgres -c "ALTER USER miniflux WITH NOSUPERUSER" - name: restart and enable miniflux - service: + ansible.builtin.service: name: miniflux state: restarted enabled: true -- cgit v1.2.3