Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script_args global config not respected #420

Open
ErisDS opened this issue Jul 9, 2019 · 1 comment
Open

script_args global config not respected #420

ErisDS opened this issue Jul 9, 2019 · 1 comment

Comments

@ErisDS
Copy link

ErisDS commented Jul 9, 2019

My cloud config looked like this:

cloud:
    script_args: stable 2017.7.8 
    provider: do
    minion:
      master: x.x.x.x

    providers:
      digital_ocean.conf:
        do:
          driver: digital_ocean

I was expecting that doing state.apply would result in the script_args line in /etc/salt/cloud would be updated.

Changing the config to

cloud:
    provider: do
    minion:
      master: x.x.x.x

    providers:
      digital_ocean.conf:
        do:
          driver: digital_ocean
          script_args: stable 2017.7.8 

Correctly updates /etc/salt/cloud.providers.d/digital_ocean.conf and works.

However I'd expect that it would be possible to override the global value in /etc/salt/cloud/.

Caveat: i might be wrong about /etc/salt/cloud being the right place to honour this - in our system we have a script_args line in there, but it may have been hardcoded before we started using salt-formula.

The main point is that this config option is only respected within individual providers, and there is extremely limited documentation around that makes it clear this is how to configure script_args.

The fundamental point being needing to hardcode the minion to not fall behind the master.

@myii
Copy link
Member

myii commented Jul 10, 2019

Thanks for opening this issue @ErisDS. Let me offer some general feedback as a starting point.

I was expecting that doing state.apply would result in the script_args line in /etc/salt/cloud would be updated.

The policy throughout this formula is not to touch the default configuration files such as:

  • /etc/salt/cloud
  • /etc/salt/master
  • /etc/salt/minion

Instead, any overrides/customisations are applied in .conf files in the /etc/salt/*.d/ directories.

Caveat: i might be wrong about /etc/salt/cloud being the right place to honour this - in our system we have a script_args line in there, but it may have been hardcoded before we started using salt-formula.

The current source file doesn't provide script_args, so you're probably right. What's the configuration option you have in your /etc/salt/cloud file?

The main point is that this config option is only respected within individual providers, and there is extremely limited documentation around that makes it clear this is how to configure script_args.

This search provides a few definitions and a number of examples, such as:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants