Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues from ansible-lint run #56

Open
tahonen opened this issue Nov 28, 2018 · 0 comments
Open

Fix issues from ansible-lint run #56

tahonen opened this issue Nov 28, 2018 · 0 comments

Comments

@tahonen
Copy link
Contributor

tahonen commented Nov 28, 2018

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_cleanup/tasks/main.yml:1
Task/Handler: Stop nc from listening

[305] Use shell only when shell functionality is required
/tmp/stc/playbooks/roles/check_cleanup/tasks/main.yml:1
Task/Handler: Stop nc from listening

[303] curl used in place of get_url or uri module
/tmp/stc/playbooks/roles/check_connectivity/tasks/main.yml:1
Task/Handler: cURL proxy whitelisted sites

[305] Use shell only when shell functionality is required
/tmp/stc/playbooks/roles/check_connectivity/tasks/main.yml:1
Task/Handler: cURL proxy whitelisted sites

[303] curl used in place of get_url or uri module
/tmp/stc/playbooks/roles/check_connectivity/tasks/main.yml:6
Task/Handler: Check download speed

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_connectivity/tasks/main.yml:10
Task/Handler: set_fact file=/tmp/stc/playbooks/roles/check_connectivity/tasks/main.yml download_speed={{bandwidth.stdout}} line=11

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_disks/tasks/main.yml:1
Task/Handler: shell lsblk -r | grep -c disk

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_disks/tasks/main.yml:1
Task/Handler: shell lsblk -r | grep -c disk

[403] Package installs should not use latest
/tmp/stc/playbooks/roles/check_docker_setup/tasks/main.yml:1
Task/Handler: Ensure docker installed

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_docker_setup/tasks/main.yml:43
Task/Handler: Enable docker

[303] systemctl used in place of systemd module
/tmp/stc/playbooks/roles/check_docker_setup/tasks/main.yml:43
Task/Handler: Enable docker

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_docker_setup/tasks/main.yml:46
Task/Handler: Start docker

[303] systemctl used in place of systemd module
/tmp/stc/playbooks/roles/check_docker_setup/tasks/main.yml:46
Task/Handler: Start docker

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_docker_validation/tasks/main.yml:1
Task/Handler: Pull some basic docker images

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_firewall_initialize/tasks/main.yml:14
Task/Handler: Start nc -l to all valid ports

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_glusterfs/tasks/main.yml:1
Task/Handler: Check if NTP enabled

[201] Trailing whitespace
/tmp/stc/playbooks/roles/check_glusterfs/tasks/main.yml:3
timedatectl | grep "NTP enabled: yes"

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_glusterfs/tasks/main.yml:6
Task/Handler: Check if NTP synchronized

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_networking/tasks/main.yml:1
Task/Handler: check is net.ipv4.ip_forward turned on

[303] systemctl used in place of systemd module
/tmp/stc/playbooks/roles/check_nm/tasks/main.yml:1
Task/Handler: Ensure that NetworkManager is running

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:2
Task/Handler: Determine if chrony is installed

[303] rpm used in place of yum or rpm_key module
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:2
Task/Handler: Determine if chrony is installed

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:7
Task/Handler: Determine if ntp is installed

[303] rpm used in place of yum or rpm_key module
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:7
Task/Handler: Determine if ntp is installed

[201] Trailing whitespace
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:33

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_ntp/tasks/main.yml:34
Task/Handler: Start and enable chronyd/ntpd

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_os/tasks/main.yml:1
Task/Handler: assert that=[u"(ansible_distribution == 'RedHat' and ansible_distribution_version == '7.4') or (ansible_distribution == 'RedHat' and ansible_distribution_version == '7.5') or (ansible_distribution == 'RedHat' and ansible_distribution_version == '7.6')"] msg=The only supported platforms for this release are RHEL 7.4 or RHEL 7.5 or RHEL 7.6 file=/tmp/stc/playbooks/roles/check_os/tasks/main.yml line=2

[403] Package installs should not use latest
/tmp/stc/playbooks/roles/check_packages_bastion/tasks/main.yml:1
Task/Handler: Install packages

[403] Package installs should not use latest
/tmp/stc/playbooks/roles/check_packages_bastion/tasks/main.yml:8
Task/Handler: update bastion packages

[403] Package installs should not use latest
/tmp/stc/playbooks/roles/check_packages_nodes/tasks/main.yml:1
Task/Handler: Install packages

[403] Package installs should not use latest
/tmp/stc/playbooks/roles/check_packages_nodes/tasks/main.yml:7
Task/Handler: Update packages

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_packages_nodes/tasks/main.yml:11
Task/Handler: Shutdown

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_packages_nodes/tasks/main.yml:23
Task/Handler: Update packages

[303] yum used in place of yum module
/tmp/stc/playbooks/roles/check_packages_nodes/tasks/main.yml:23
Task/Handler: Update packages

[301] Commands should not change things if nothing needs doing
/tmp/stc/playbooks/roles/check_sizing/tasks/main.yml:1
Task/Handler: shell echo 'Currently CPU has {{ ansible_processor_vcpus }} vCPUs and memory is {{ (ansible_memory_mb.real.total / 1024) | round | int }} GBs. Node sizing is {{ node_vcpus }} for vCPUs, and {{ (node_mem / 1024) | round | int }} for memory.'

[305] Use shell only when shell functionality is required
/tmp/stc/playbooks/roles/check_sizing/tasks/main.yml:1
Task/Handler: shell echo 'Currently CPU has {{ ansible_processor_vcpus }} vCPUs and memory is {{ (ansible_memory_mb.real.total / 1024) | round | int }} GBs. Node sizing is {{ node_vcpus }} for vCPUs, and {{ (node_mem / 1024) | round | int }} for memory.'

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_sizing/tasks/main.yml:1
Task/Handler: shell echo 'Currently CPU has {{ ansible_processor_vcpus }} vCPUs and memory is {{ (ansible_memory_mb.real.total / 1024) | round | int }} GBs. Node sizing is {{ node_vcpus }} for vCPUs, and {{ (node_mem / 1024) | round | int }} for memory.'

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_sizing/tasks/main.yml:4
Task/Handler: fail msg=Not enough CPU cores or memory. file=/tmp/stc/playbooks/roles/check_sizing/tasks/main.yml line=5

[502] All tasks should be named
/tmp/stc/playbooks/roles/check_storage/tasks/main.yml:1
Task/Handler: shell if [[ $(df -T / | tail -n 1 | awk '{print $2}') == "btrfs" ]]; then
btrfs fi usage --kbytes / | awk '/^.Free / {print $3}'| sed 's/..//'
else
df -BK / | tail -n 1 | awk '/^[^Filesystem]/ {print $4}' | sed 's/K//'
fi

[503] Tasks that run when changed should likely be handlers
/tmp/stc/playbooks/roles/check_subscription/tasks/main.yml:16
Task/Handler: Disable all repos

[305] Use shell only when shell functionality is required
/tmp/stc/playbooks/roles/check_subscription/tasks/main.yml:20
Task/Handler: Enable correct repos

[503] Tasks that run when changed should likely be handlers
/tmp/stc/playbooks/roles/check_subscription/tasks/main.yml:20
Task/Handler: Enable correct repos

[305] Use shell only when shell functionality is required
/tmp/stc/playbooks/roles/check_subscription/tasks/main.yml:26
Task/Handler: Enable correct repos for

[503] Tasks that run when changed should likely be handlers
/tmp/stc/playbooks/roles/check_subscription/tasks/main.yml:26
Task/Handler: Enable correct repos for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant