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/cgit/tasks/dependencies.yml | 8 ++++---- roles/cgit/tasks/main.yml | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'roles/cgit/tasks') diff --git a/roles/cgit/tasks/dependencies.yml b/roles/cgit/tasks/dependencies.yml index c0439e8..9c3623a 100644 --- a/roles/cgit/tasks/dependencies.yml +++ b/roles/cgit/tasks/dependencies.yml @@ -1,11 +1,11 @@ - name: retrieve dependencies for lowdown # noqa: no-changed-when - shell: | + ansible.builtin.shell: | set -o pipefail ldd /usr/local/bin/lowdown | tr -s " " | grep "0 1 0" | cut -d " " -f 7 register: result - name: create dependencies directories in chroot - file: + ansible.builtin.file: path: "{{ cgit_chroot_dir }}{{ item | dirname }}" owner: 0 group: 0 @@ -14,7 +14,7 @@ loop: "{{ result.stdout_lines }}" - name: copy dependencies for lowdown - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ cgit_chroot_dir }}/{{ item }}" mode: preserve @@ -22,7 +22,7 @@ loop: "{{ result.stdout_lines }}" - name: copy utilities in httpd chroot - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ cgit_chroot_dir }}/bin" mode: preserve diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml index 4559708..245b34f 100644 --- a/roles/cgit/tasks/main.yml +++ b/roles/cgit/tasks/main.yml @@ -1,12 +1,12 @@ - name: install cgit packages - package: + ansible.builtin.package: name: - cgit - lowdown state: present - name: create cgit cache directory - file: + ansible.builtin.file: path: "{{ cgit_chroot_dir }}/cache/cgit" owner: www group: www @@ -14,25 +14,25 @@ state: directory - name: generate cgit configuration files - template: + ansible.builtin.template: src: "{{ item.template }}" dest: "{{ item.file }}" owner: 0 group: 0 mode: 0644 loop: - - template: cgitrc.j2 + - ansible.builtin.template: cgitrc.j2 file: "{{ cgit_chroot_dir }}/conf/cgitrc" - - template: footer.html.j2 + - ansible.builtin.template: footer.html.j2 file: "{{ cgit_chroot_dir }}/conf/footer.html" - - template: httpd.conf.j2 + - ansible.builtin.template: httpd.conf.j2 file: /etc/httpd.d/cgit.conf - name: include dependencies for lowdown - include_tasks: dependencies.yml + ansible.builtin.include_tasks: dependencies.yml - name: copy about-filter generator - copy: + ansible.builtin.copy: src: about-filter.sh dest: "{{ cgit_chroot_dir }}/bin/about-filter.sh" owner: 0 @@ -40,13 +40,13 @@ mode: 0755 - name: start and enable slowcgi service - service: + ansible.builtin.service: name: slowcgi state: restarted enabled: true - name: httpd password information - debug: + ansible.builtin.debug: msg: | Please provide a password using htpasswd, in "{{ cgit_chroot_dir }}/htpasswd/cgit" -- cgit v1.2.3