apache (core salt) vs apache2 (saltstack formulas)

31 views
Skip to first unread message

Paul

unread,
Oct 19, 2020, 4:18:11 PM10/19/20
to Salt-users
In https://github.com/saltstack-formulas/apache-formula Apache2 is called apache.

But in 

   salt '*' pkg.install apache2

Are these two alternates?  Or the apache-formula one is a more full-featured version of the slimmer default one build into core salt. To what extent can they be mixed?

Phipps, Thomas

unread,
Oct 19, 2020, 4:38:18 PM10/19/20
to salt-...@googlegroups.com
Paul,

The two are only slightly related. the apache-formula are states to install, and configure the HTTPd daemon using a highstate, such as `salt \* state.apply apache` if you have the formula setup in your salt filesystem properly. `pkg.install` does not use the formula, it just installs the repo package that you name. apache2 is the name of the package that contains the httpd daemon on your distro. I believe that is Debian based.

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/8e65e28e-c853-4700-8303-eb98140faca1n%40googlegroups.com.

Paul

unread,
Oct 19, 2020, 5:14:12 PM10/19/20
to Salt-users
OK best to choose one of the other then.  Thanks.

pkg.install apache2 only followed by cmd.run bits and pieces (sed etc)
Or avoidance of that, and apache-formula state.apply things instead.

Incidentally, you said apache2 is debian-based. It works for salt "seasoning" Alpine containers too. Perfect install, but no auto-start on Alpine: /etc/init.d/httpd start .. is needed.

Phipps, Thomas

unread,
Oct 19, 2020, 5:28:09 PM10/19/20
to salt-...@googlegroups.com
Paul,

Actually, I said apache2 is the package name in debian based distros, it must be the package name in Alpine as well. Which has nothing to do with salt directly. remember pkg.install works with the distro to install the package pretty much the same thing as running `apt-get install apache2` or `yum install httpd` or whatever alpine uses for a package manager. 

only under windows is pkg special to salt. but that is because windows does not have a package manager. 



--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.

Paul

unread,
Oct 19, 2020, 5:37:17 PM10/19/20
to Salt-users
Doh!  so obvious now you mention it, yet had eluded me!!!

Reply all
Reply to author
Forward
0 new messages