2

I would like salt-cloud to install the salt-minion using the same sources.list.d/saltstack.list file that is on the saltmaster server, but it uses the Ubuntu APT repository instead.

What I get on a new minion in /etc/apt/sources.list.d/saltstack.list:

deb https://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main

What I want:

deb https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main

I installed salt-master and salt-cloud from the Saltstack repository by doing the following on my saltmaster server:

wget -O - https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main" > etc/apt/sources.list.d/saltstack.list
apt update
apt install python3-pip salt-master salt-minion salt-cloud

I spin up a server using salt-cloud and the /etc/apt/sources.list.d/saltstack.list without fail uses the apt repository, not the py3 repository.

Is there an option I can set in the saltmaster configuration file that defines which repository salt-cloud should use? Is there a similar option in a salt-cloud profile that can be passed to the salt bootstrap script?

I see in the bootstrap script that salt-cloud runs (found at bootstrap.saltstack.com) a command line option called _CUSTOM_REPO_URL, but I don't know how to pass options to that script when creating a server with salt-cloud -p

Happy to ask elsewhere (please indicate where) if more appropriate.

I can provide applicable parts of my salt-cloud profile if needed.

Hman
  • 106
  • 6
  • http://askubuntu.com/ is a better fit. – ggorlen Aug 05 '20 at 15:48
  • 1
    Thanks. I will ask there too, but my question/situation feels more salt-stack related than Ubuntu related. There isn't even a tag for salt-stack on askubuntu.com, so it seems more likely that people interested in Salt will see my question here. – Hman Aug 05 '20 at 15:56
  • Fair enough. I don't really know what salt stack is, but it seems like a bunch of ubuntu commands to me which is usually off-topic for SO which is about programming questions and answers. See [on topic](https://stackoverflow.com/help/on-topic). The ubuntu tag says "This tag should be used only for WRITING OR RUNNING PROGRAMS specifically in Ubuntu 18.04". Better not to cross-post, and you have an upvote so probably keep it here for now. – ggorlen Aug 05 '20 at 16:03

1 Answers1

1

I found https://docs.saltstack.com/en/latest/topics/cloud/deploy.html#deploy-script-arguments

That led me to add the following to my cloud server profile used with the salt-cloud -p command:

script: bootstrap-salt
script_args: -x python3

Then the correct repository was installed.

Hman
  • 106
  • 6