mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 17:10:27 +00:00
auto region
This commit is contained in:
parent
8def9a5691
commit
cb690b5920
1 changed files with 7 additions and 2 deletions
|
@ -81,11 +81,16 @@
|
|||
when: cloud.stdout == 'alicloud'
|
||||
|
||||
- name: Install huawei agent
|
||||
shell: curl -k -O 'https://hss-agent.ap-southeast-1.myhuaweicloud.com:10180/package/agent/linux/x86/hostguard.x86_64.deb' && echo 'MASTER_IP=hss-agent.ap-southeast-1.myhuaweicloud.com:10180' > hostguard_setup_config.conf && echo 'SLAVE_IP=hss-agent-slave.ap-southeast-1.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
|
||||
shell: curl -s http://169.254.169.254/openstack/latest/meta_data.json | jq .region_id | tr -d '"'
|
||||
register: region_id
|
||||
when: 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.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'
|
||||
|
||||
- name: Install huawei agent
|
||||
shell: curl -k -O 'https://hss-agent.ap-southeast-1.myhuaweicloud.com:10180/package/agent/linux/x86/hostguard.x86_64.rpm' && echo 'MASTER_IP=hss-agent.ap-southeast-1.myhuaweicloud.com:10180' > hostguard_setup_config.conf && echo 'SLAVE_IP=hss-agent-slave.ap-southeast-1.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
|
||||
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: cloud_agent
|
||||
|
|
Loading…
Reference in a new issue