From ea5ee37b8c1da0345131f23f7b840d80fae9ecea Mon Sep 17 00:00:00 2001 From: Aidaho Date: Fri, 2 May 2025 10:28:52 +0300 Subject: [PATCH] v8.1.8: Simplify Ansible tasks by removing or commenting unused logic Unused and commented-out conditions were removed or commented in multiple Ansible task files to streamline execution. This cleanup reduces complexity while ensuring unnecessary operations are excluded. --- .../roles/node_exporter/tasks/configure.yml | 18 +++++++++--------- .../ansible/roles/node_exporter/tasks/main.yml | 4 ---- .../roles/service_common/tasks/main.yml | 1 - 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/app/scripts/ansible/roles/node_exporter/tasks/configure.yml b/app/scripts/ansible/roles/node_exporter/tasks/configure.yml index 0a269032..d0b70c39 100644 --- a/app/scripts/ansible/roles/node_exporter/tasks/configure.yml +++ b/app/scripts/ansible/roles/node_exporter/tasks/configure.yml @@ -40,12 +40,12 @@ mode: u+rwX,g+rwX,o=rX when: node_exporter_textfile_dir | length > 0 -- name: Allow node_exporter port in SELinux on RedHat OS family - seport: - ports: "{{ node_exporter_web_listen_address.split(':')[-1] }}" - proto: tcp - setype: http_port_t - state: present - when: - - ansible_version.full is version_compare('2.4', '>=') - - ansible_selinux.status == "enabled" +#- name: Allow node_exporter port in SELinux on RedHat OS family +# seport: +# ports: "{{ node_exporter_web_listen_address.split(':')[-1] }}" +# proto: tcp +# setype: http_port_t +# state: present +# when: +# - ansible_version.full is version_compare('2.4', '>=') +# - ansible_selinux.status == "enabled" diff --git a/app/scripts/ansible/roles/node_exporter/tasks/main.yml b/app/scripts/ansible/roles/node_exporter/tasks/main.yml index 74d0ad84..c0b32782 100644 --- a/app/scripts/ansible/roles/node_exporter/tasks/main.yml +++ b/app/scripts/ansible/roles/node_exporter/tasks/main.yml @@ -7,10 +7,6 @@ - import_tasks: install.yml become: true -# when: -# ( not __node_exporter_is_installed.stat.exists ) or -# ( __node_exporter_current_version_output.stderr_lines[0].split(" ")[2] != node_exporter_version ) or -# ( node_exporter_binary_local_dir | length > 0 ) tags: - node_exporter_install diff --git a/app/scripts/ansible/roles/service_common/tasks/main.yml b/app/scripts/ansible/roles/service_common/tasks/main.yml index 7038077a..76a44ebb 100644 --- a/app/scripts/ansible/roles/service_common/tasks/main.yml +++ b/app/scripts/ansible/roles/service_common/tasks/main.yml @@ -48,7 +48,6 @@ - name: Install passlib pip: name: passlib - executable: pip3 state: latest - name: Copying over nginx.conf