saltstack-formulas / nginx-formula

Nginx Salt Formula
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
163 stars 421 forks source link

feat(servers_config): add require statement to manage dependencies #278

Closed javierbertoli closed 3 years ago

javierbertoli commented 3 years ago

Also, check config before applying

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

This let's you add dependencies on other resources being applied for a particular vhost

A common case is when you use this formula together with letsencrypt's, validating through nginx: you need nginx running (to validate the vhost) but can't have the ssl vhost up until the certificate is validated (because it won't exist and will make nginx fail to load the configuration)

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

aboe76 commented 3 years ago

@javierbertoli I'm missing the requires test it's only mentioned in pillar.example but not in the test.

javierbertoli commented 3 years ago

Sorry, I got sidetracked. @aboe76 any suggestion of a comprehensive test for the requires introduced here? I'm not sure I can think of anything meaningful

aboe76 commented 3 years ago

@javierbertoli, I'm not sure either, maybe something with certificates.sls?

javierbertoli commented 3 years ago

@aboe76 added some tests and they pass, so I'll merge. Thanks!

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 2.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: