Skip to content
Snippets Groups Projects
Verified Commit 88685e06 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Replace 'skip_ansible_lint' tags with 'noqa' ones

This might be a bug in ansible-lint 6.5.0, but it appears to ignore all
our 'skip_ansible_lint' tags. Fix this by replacing them with noqa tags.
parent 523eb09e
No related branches found
No related tags found
1 merge request!620Fixes for ansible-lint 6.5.0
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
when: release.changed or db_created.changed when: release.changed or db_created.changed
- name: Check python module availability - name: Check python module availability # noqa no-changed-when
command: poetry run python3 -c 'import aurweb' command: poetry run python3 -c 'import aurweb'
args: args:
chdir: "{{ aurweb_dir }}" chdir: "{{ aurweb_dir }}"
...@@ -170,8 +170,6 @@ ...@@ -170,8 +170,6 @@
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
ignore_errors: true ignore_errors: true
register: aurweb_installed register: aurweb_installed
tags:
- skip_ansible_lint
- name: Install python module - name: Install python module
command: poetry install command: poetry install
...@@ -258,53 +256,43 @@ ...@@ -258,53 +256,43 @@
- name: Create git repo dir - name: Create git repo dir
file: path={{ aurweb_git_dir }} state=directory owner={{ aurweb_user }} group=http mode=0775 file: path={{ aurweb_git_dir }} state=directory owner={{ aurweb_user }} group=http mode=0775
- name: Init git directory - name: Init git directory # noqa command-instead-of-module
command: git init --bare {{ aurweb_git_dir }} command: git init --bare {{ aurweb_git_dir }}
args: args:
creates: "{{ aurweb_git_dir }}/HEAD" creates: "{{ aurweb_git_dir }}/HEAD"
become: true become: true
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
tags:
- skip_ansible_lint
- name: Save hideRefs setting on var - name: Save hideRefs setting on var # noqa command-instead-of-module no-changed-when
command: git config --local --get-all transfer.hideRefs command: git config --local --get-all transfer.hideRefs
register: git_config register: git_config
args: args:
chdir: "{{ aurweb_git_dir }}" chdir: "{{ aurweb_git_dir }}"
failed_when: git_config.rc == 2 # FIXME: does not work. failed_when: git_config.rc == 2 # FIXME: does not work.
tags:
- skip_ansible_lint
- name: Configure git tranfser.hideRefs - name: Configure git tranfser.hideRefs # noqa command-instead-of-module
command: git config --local transfer.hideRefs '^refs/' command: git config --local transfer.hideRefs '^refs/'
args: args:
chdir: "{{ aurweb_git_dir }}" chdir: "{{ aurweb_git_dir }}"
become: true become: true
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
when: git_config.stdout.find('^refs/') == -1 when: git_config.stdout.find('^refs/') == -1
tags:
- skip_ansible_lint
- name: Configure git transfer.hideRefs second - name: Configure git transfer.hideRefs second # noqa command-instead-of-module
command: git config --local --add transfer.hideRefs '!refs/' command: git config --local --add transfer.hideRefs '!refs/'
args: args:
chdir: "{{ aurweb_git_dir }}" chdir: "{{ aurweb_git_dir }}"
become: true become: true
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
when: git_config.stdout.find('!refs/') == -1 when: git_config.stdout.find('!refs/') == -1
tags:
- skip_ansible_lint
- name: Configure git transfer.hideRefs third - name: Configure git transfer.hideRefs third # noqa command-instead-of-module
command: git config --local --add transfer.hideRefs '!HEAD' command: git config --local --add transfer.hideRefs '!HEAD'
args: args:
chdir: "{{ aurweb_git_dir }}" chdir: "{{ aurweb_git_dir }}"
become: true become: true
become_user: "{{ aurweb_user }}" become_user: "{{ aurweb_user }}"
when: git_config.stdout.find('!HEAD') == -1 when: git_config.stdout.find('!HEAD') == -1
tags:
- skip_ansible_lint
- name: Configure sshd - name: Configure sshd
template: src=aurweb_config.j2 dest={{ sshd_includes_dir }}/aurweb_config owner=root group=root mode=0600 validate='/usr/sbin/sshd -t -f %s' template: src=aurweb_config.j2 dest={{ sshd_includes_dir }}/aurweb_config owner=root group=root mode=0600 validate='/usr/sbin/sshd -t -f %s'
......
...@@ -10,15 +10,13 @@ ...@@ -10,15 +10,13 @@
loop: "{{ backup_hosts }}" loop: "{{ backup_hosts }}"
changed_when: borg_list.stdout | length > 0 changed_when: borg_list.stdout | length > 0
- name: Init borg repository - name: Init borg repository # noqa ignore-errors
command: "{{ item['borg_cmd'] }} init -e keyfile {{ item['host'] }}/{{ item['dir'] }}" command: "{{ item['borg_cmd'] }} init -e keyfile {{ item['host'] }}/{{ item['dir'] }}"
when: borg_list is failed when: borg_list is failed
environment: environment:
BORG_PASSPHRASE: "" BORG_PASSPHRASE: ""
ignore_errors: true # This can sometimes fail if a backup is in progress :/ ignore_errors: true # This can sometimes fail if a backup is in progress :/
loop: "{{ backup_hosts }}" loop: "{{ backup_hosts }}"
tags:
- skip_ansible_lint
- name: Install convenience scripts - name: Install convenience scripts
......
...@@ -231,23 +231,19 @@ ...@@ -231,23 +231,19 @@
- name: Add arch-svntogit user - name: Add arch-svntogit user
user: name=svntogit shell=/sbin/nologin home=/srv/svntogit generate_ssh_key=yes ssh_key_bits=4096 user: name=svntogit shell=/sbin/nologin home=/srv/svntogit generate_ssh_key=yes ssh_key_bits=4096
- name: Configure svntogit git user name - name: Configure svntogit git user name # noqa command-instead-of-module
command: git config --global user.name svntogit command: git config --global user.name svntogit
become: true become: true
become_user: svntogit become_user: svntogit
register: git_config_username register: git_config_username
changed_when: "git_config_username.rc == 0" changed_when: "git_config_username.rc == 0"
tags:
- skip_ansible_lint
- name: Configure svntogit git user email - name: Configure svntogit git user email # noqa command-instead-of-module
command: git config --global user.email svntogit@repos.archlinux.org command: git config --global user.email svntogit@repos.archlinux.org
become: true become: true
become_user: svntogit become_user: svntogit
register: git_config_email register: git_config_email
changed_when: "git_config_email.rc == 0" changed_when: "git_config_email.rc == 0"
tags:
- skip_ansible_lint
- name: Template arch-svntogit - name: Template arch-svntogit
copy: src=update-repos.sh dest=/srv/svntogit/update-repos.sh owner=root group=root mode=0755 copy: src=update-repos.sh dest=/srv/svntogit/update-repos.sh owner=root group=root mode=0755
...@@ -255,17 +251,15 @@ ...@@ -255,17 +251,15 @@
- name: Create svntogit repos subdir - name: Create svntogit repos subdir
file: path="/srv/svntogit/repos" state=directory owner=svntogit group=svntogit mode=0775 file: path="/srv/svntogit/repos" state=directory owner=svntogit group=svntogit mode=0775
- name: Clone git-svn repos - name: Clone git-svn repos # noqa command-instead-of-module
command: git svn clone file:///srv/repos/svn-{{ item }}/svn /srv/svntogit/repos/{{ item }} creates=/srv/svntogit/repos/{{ item }} command: git svn clone file:///srv/repos/svn-{{ item }}/svn /srv/svntogit/repos/{{ item }} creates=/srv/svntogit/repos/{{ item }}
with_items: with_items:
- community - community
- packages - packages
become: true become: true
become_user: svntogit become_user: svntogit
tags:
- skip_ansible_lint
- name: Add svntogit public remotes - name: Add svntogit public remotes # noqa command-instead-of-module
command: git remote add public git@github.com:archlinux/svntogit-{{ item }}.git chdir=/srv/svntogit/repos/{{ item }} command: git remote add public git@github.com:archlinux/svntogit-{{ item }}.git chdir=/srv/svntogit/repos/{{ item }}
with_items: with_items:
- community - community
...@@ -275,11 +269,9 @@ ...@@ -275,11 +269,9 @@
ignore_errors: true ignore_errors: true
register: git_public_remote register: git_public_remote
changed_when: "git_public_remote.rc == 0" changed_when: "git_public_remote.rc == 0"
tags:
- skip_ansible_lint
# The following command also serves as a way to get the data the first time the repo is set up # The following command also serves as a way to get the data the first time the repo is set up
- name: Configure svntogit pull upstream branch - name: Configure svntogit pull upstream branch # noqa command-instead-of-module
command: git pull --set-upstream public master chdir=/srv/svntogit/repos/{{ item }} command: git pull --set-upstream public master chdir=/srv/svntogit/repos/{{ item }}
environment: environment:
SHELL: /bin/bash SHELL: /bin/bash
...@@ -290,8 +282,6 @@ ...@@ -290,8 +282,6 @@
become_user: svntogit become_user: svntogit
register: git_pull_upstream register: git_pull_upstream
changed_when: "git_pull_upstream.rc == 0" changed_when: "git_pull_upstream.rc == 0"
tags:
- skip_ansible_lint
- name: Fix svntogit home permissions - name: Fix svntogit home permissions
file: path="/srv/svntogit" state=directory owner=svntogit group=svntogit mode=0775 file: path="/srv/svntogit" state=directory owner=svntogit group=svntogit mode=0775
......
...@@ -18,7 +18,5 @@ ...@@ -18,7 +18,5 @@
- name: Install download script - name: Install download script
copy: src=gluebuddy_download.sh dest=/usr/local/bin/gluebuddy_download.sh owner=root group=root mode=0755 copy: src=gluebuddy_download.sh dest=/usr/local/bin/gluebuddy_download.sh owner=root group=root mode=0755
- name: Download latest gluebuddy - name: Download latest gluebuddy # noqa no-changed-when
command: /usr/local/bin/gluebuddy_download.sh command: /usr/local/bin/gluebuddy_download.sh
tags:
- skip_ansible_lint
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment