From 7fc46813b6ca56b53cf02031de1a2ac17280deaf Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Sun, 25 Jun 2023 11:31:22 +0800 Subject: [PATCH] huaweicloud auto select region to install agent --- apps/roles/role_cloud/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/roles/role_cloud/tasks/main.yml b/apps/roles/role_cloud/tasks/main.yml index 1e3558be..c7288bb8 100644 --- a/apps/roles/role_cloud/tasks/main.yml +++ b/apps/roles/role_cloud/tasks/main.yml @@ -87,10 +87,10 @@ - name: Install huawei agent shell: curl -k -O 'https://hss-agent.{{region_id.stdout}}.myhuaweicloud.com:10180/package/agent/linux/x86/hostguard.x86_64.deb' && echo 'MASTER_IP=hss-agent.{{region_id.stdout}}.myhuaweicloud.com:10180' > hostguard_setup_config.conf && echo 'SLAVE_IP=hss-agent-slave.{{region_id.stdout}}.myhuaweicloud.com:10180' >> hostguard_setup_config.conf && echo 'ORG_ID=' >> hostguard_setup_config.conf && dpkg -i hostguard.x86_64.deb && rm -f hostguard_setup_config.conf && rm -f hostguard.x86_64.deb - when: ansible_os_family == "RedHat" and cloud.stdout == 'huawei' + when: ansible_os_family == "Debian" and cloud.stdout == 'huawei' - name: Install huawei agent shell: curl -k -O 'https://hss-agent.{{region_id.stdout}}.myhuaweicloud.com:10180/package/agent/linux/x86/hostguard.x86_64.rpm' && echo 'MASTER_IP=hss-agent.{{region_id.stdout}}.myhuaweicloud.com:10180' > hostguard_setup_config.conf && echo 'SLAVE_IP=hss-agent-slave.{{region_id.stdout}}.myhuaweicloud.com:10180' >> hostguard_setup_config.conf && echo 'ORG_ID=' >> hostguard_setup_config.conf && rpm -ivh hostguard.x86_64.rpm && rm -f hostguard_setup_config.conf && rm -f hostguard.x86_64.rpm - when: ansible_os_family == "Debian" and cloud.stdout == 'huawei' + when: ansible_os_family == "RedHat" and cloud.stdout == 'huawei' when: cloud_agent