added pre-commit configuration for ansible-lint (#93)

Co-authored-by: willtome <wtome@redhat.com>
This commit is contained in:
Chris Edillon
2023-09-25 15:56:11 -04:00
committed by GitHub
parent d7e9ad637b
commit 2ee334f6b3
42 changed files with 187 additions and 133 deletions

View File

@@ -21,7 +21,7 @@
register: result
notify: Printing to terminal application information
- name: Printing to terminal application information # noqa: no-handler
- name: Printing to terminal application information # noqa: no-handler
ansible.builtin.debug:
msg: "The application: {{ application }} was already installed"
when: not result.changed | bool
@@ -30,4 +30,3 @@
- name: Printing to terminal application information
ansible.builtin.debug:
msg: "The application: {{ application }} has been installed"
when: result.changed | bool

View File

@@ -18,7 +18,7 @@
ansible.builtin.hostname:
name: "{{ inventory_hostname | regex_replace('_', '-') }}"
# Install subscription-manager if it's not there
# Install subscription-manager if it's not there
- name: Install subscription-manager
ansible.builtin.yum:
name: subscription-manager
@@ -65,7 +65,7 @@
- name: Configure Red Hat insights
ansible.builtin.import_role:
name: redhat.insights.insights_client
vars:
vars: # noqa var-naming[no-role-prefix]
insights_display_name: "{{ inventory_hostname }}"
insights_tags:
env: "{{ env }}"

View File

@@ -22,7 +22,7 @@
when:
- ansible_local.insights.system_id is not defined
- name: Run the Insights Client Scan # noqa: no-changed-when
- name: Run the Insights Client Scan # noqa: no-changed-when
ansible.builtin.command: insights-client
when:
- not ansible_check_mode
@@ -31,7 +31,7 @@
- name: Deploy report server
when: not ansible_check_mode
delegate_to: "{{ report_server }}"
run_once: true # noqa: run-once[task]
run_once: true # noqa: run-once[task]
block:
- name: Install firewall dependencies
ansible.builtin.dnf:

View File

@@ -11,7 +11,7 @@
ansible.builtin.shell: "{{ shell_script }}"
register: shell_output
tags:
- skip_ansible_lint # provided variable could require shell modele
- skip_ansible_lint # provided variable could require shell modele
- name: Print script output
ansible.builtin.debug:

View File

@@ -4,15 +4,15 @@
become: true
tasks:
- name: Gather recent vmstat info # noqa: no-changed-when
- name: Gather recent vmstat info # noqa: no-changed-when
ansible.builtin.command: /bin/vmstat 1 5
register: vmstat
- name: Gather top CPU hogs # noqa: no-changed-when
- name: Gather top CPU hogs # noqa: no-changed-when
ansible.builtin.command: ps -eo user,pid,size,pcpu,cmd --sort=-pcpu
register: pscpu
- name: Gather top memory hogs # noqa: no-changed-when
- name: Gather top memory hogs # noqa: no-changed-when
ansible.builtin.command: ps -eo user,pid,size,pcpu,cmd --sort=-size
register: pssize