Remove warning ignores as they are depreciated
gitea/ansible-roles/pipeline/head This commit looks good Details

Will cause a hard fail in ansible 2.14, so better get rid of them now.
There is no alternative, but the ansible warnings for those modules
are not hard failures anyways.
This commit is contained in:
Patrick Marchand 2022-12-22 11:31:28 -05:00
parent 7005344a5b
commit 1c6fdbf85a
8 changed files with 2 additions and 26 deletions

View File

@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Added ### Added
### Changed ### Changed
* Removed all "warn: False" args in command, shell and other modules as it's been depreciated and will give a hard fail in ansible-core 2.14.0.
### Fixed ### Fixed

View File

@ -9,7 +9,6 @@
args: args:
chdir: "{{ repository_path }}" chdir: "{{ repository_path }}"
creates: "{{ repository_path }}/.git/" creates: "{{ repository_path }}/.git/"
warn: no
register: git_init register: git_init
tags: tags:
- etc-git - etc-git
@ -54,7 +53,6 @@
command: "git log" command: "git log"
args: args:
chdir: "{{ repository_path }}" chdir: "{{ repository_path }}"
warn: no
changed_when: False changed_when: False
failed_when: False failed_when: False
register: git_log register: git_log
@ -66,7 +64,6 @@
shell: "git add -A . && git commit -m \"Initial commit via Ansible\"" shell: "git add -A . && git commit -m \"Initial commit via Ansible\""
args: args:
chdir: "{{ repository_path }}" chdir: "{{ repository_path }}"
warn: no
register: git_commit register: git_commit
when: git_log.rc != 0 or (git_init is defined and git_init is changed) when: git_log.rc != 0 or (git_init is defined and git_init is changed)
tags: tags:

View File

@ -23,13 +23,9 @@
- name: remount /home - name: remount /home
command: mount -o remount /home command: mount -o remount /home
args:
warn: no
- name: remount /var - name: remount /var
command: mount -o remount /var command: mount -o remount /var
args:
warn: no
- name: restart nginx - name: restart nginx

View File

@ -126,8 +126,6 @@
# - name: Get mount options for /usr partition # - name: Get mount options for /usr partition
# shell: "mount | grep 'on /usr type'" # shell: "mount | grep 'on /usr type'"
# args:
# warn: no
# register: mount # register: mount
# changed_when: False # changed_when: False
# failed_when: False # failed_when: False

View File

@ -18,15 +18,11 @@
shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*" shell: "chown --verbose www-data:munin /var/log/munin/munin-cgi-*"
register: command_result register: command_result
changed_when: "'changed' in command_result.stdout" changed_when: "'changed' in command_result.stdout"
args:
warn: no
- name: Mode for munin-cgi is set to 660 - name: Mode for munin-cgi is set to 660
shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*" shell: "chmod --verbose 660 /var/log/munin/munin-cgi-*"
register: command_result register: command_result
changed_when: "'changed' in command_result.stdout" changed_when: "'changed' in command_result.stdout"
args:
warn: no
- name: Systemd unit for Munin-fcgi is installed - name: Systemd unit for Munin-fcgi is installed
copy: copy:

View File

@ -88,8 +88,6 @@
- name: "is Ruby {{ rbenv_ruby_version }} available for {{ username }} ?" - name: "is Ruby {{ rbenv_ruby_version }} available for {{ username }} ?"
shell: /bin/bash -lc "rbenv versions | grep {{ rbenv_ruby_version }}" shell: /bin/bash -lc "rbenv versions | grep {{ rbenv_ruby_version }}"
args:
warn: no
failed_when: False failed_when: False
changed_when: False changed_when: False
check_mode: False check_mode: False
@ -101,8 +99,6 @@
- name: "Ruby {{ rbenv_ruby_version }} is available for {{ username }} (be patient... could be long)" - name: "Ruby {{ rbenv_ruby_version }} is available for {{ username }} (be patient... could be long)"
shell: /bin/bash -lc "TMPDIR=~/tmp rbenv install {{ rbenv_ruby_version }}" shell: /bin/bash -lc "TMPDIR=~/tmp rbenv install {{ rbenv_ruby_version }}"
args:
warn: no
when: ruby_installed.rc != 0 when: ruby_installed.rc != 0
become_user: "{{ username }}" become_user: "{{ username }}"
become: yes become: yes
@ -111,8 +107,6 @@
- name: "is Ruby {{ rbenv_ruby_version }} selected for {{ username }} ?" - name: "is Ruby {{ rbenv_ruby_version }} selected for {{ username }} ?"
shell: /bin/bash -lc "rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv_ruby_version }}'" shell: /bin/bash -lc "rbenv version | cut -d ' ' -f 1 | grep -Fx '{{ rbenv_ruby_version }}'"
args:
warn: no
register: ruby_selected register: ruby_selected
changed_when: False changed_when: False
failed_when: False failed_when: False
@ -124,8 +118,6 @@
- name: "select Ruby {{ rbenv_ruby_version }} for {{ username }}" - name: "select Ruby {{ rbenv_ruby_version }} for {{ username }}"
shell: /bin/bash -lc "rbenv global {{ rbenv_ruby_version }} && rbenv rehash" shell: /bin/bash -lc "rbenv global {{ rbenv_ruby_version }} && rbenv rehash"
args:
warn: no
when: ruby_selected.rc != 0 when: ruby_selected.rc != 0
become_user: "{{ username }}" become_user: "{{ username }}"
become: yes become: yes

View File

@ -1,6 +1,4 @@
--- ---
- name: remount usr - name: remount usr
command: "mount -o remount /usr" command: "mount -o remount /usr"
failed_when: false failed_when: false
args:
warn: no

View File

@ -100,8 +100,6 @@
register: command_result register: command_result
changed_when: "'changed' in command_result.stdout" changed_when: "'changed' in command_result.stdout"
# failed_when: False # failed_when: False
args:
warn: False
- name: Add evoadmin sudoers file - name: Add evoadmin sudoers file
template: template: