| #!/bin/bash -xe |
| |
| SALTSTACK_REPO=${SALTSTACK_REPO:-"deb [arch=amd64] https://mirror.mirantis.com/stable/saltstack-2017.7/xenial/ xenial main"} |
| SALTSTACK_GPG=${SALTSTACK_GPG:-"https://mirror.mirantis.com/proposed/saltstack-2017.7/xenial/SALTSTACK-GPG-KEY.pub"} |
| |
| wget -O - ${SALTSTACK_GPG} | sudo apt-key add - |
| echo "${SALTSTACK_REPO}" > /etc/apt/sources.list.d/mcp_saltstack.list |
| |
| # This Pin-Priority fil should be always aligned with |
| # https://github.com/Mirantis/reclass-system-salt-model/blob/master/linux/system/repo/mcp/apt_mirantis/saltstack.yml |
| cat <<EOF >> /etc/apt/preferences.d/mcp_saltstack |
| Package: libsodium18 |
| Pin: release o=SaltStack |
| Pin-Priority: 50 |
| |
| Package: * |
| Pin: release o=SaltStack |
| Pin-Priority: 1100 |
| EOF |
| |
| apt-get update |
| apt-get -y install salt-minion |
| mkdir -m700 -p /etc/salt/pki/minion |
| |
| cat <<EOF >> /etc/salt/minion.d/minion.conf |
| max_event_size: 100000000 |
| acceptance_wait_time_max: 60 |
| acceptance_wait_time: 10 |
| random_reauth_delay: 270 |
| recon_default: 1000 |
| recon_max: 60000 |
| recon_randomize: True |
| auth_timeout: 60 |
| EOF |
| |
| rm -vf /etc/apt/apt.conf.d/99allow_unauthenticated |
| rm -vf /etc/apt/sources.list.d/mcp_saltstack.list |
| rm -vf /etc/apt/preferences.d/mcp_saltstack |