Guidline: avoid two ways of fiddling in config files (if possible)

50 views
Skip to first unread message

Thomas Güttler

unread,
Apr 10, 2017, 5:32:56 AM4/10/17
to Salt-users
After thinking about it again, it is obvious, but I was blind first.

I had a formular which modified /etc/sudoers

But it I better practice to have a custom file in: /etc/sudoers.d/

Is there a saltstack guideline for new comers which could add this "secret knowledge"?

Regards,
  Thomas

Daniel Wallace

unread,
Apr 10, 2017, 10:20:57 AM4/10/17
to Salt-users
It all depends on how you want to maintain your files.

Some users use the module directories for different services, some modify the main config file.

I don't think it is SaltStack specific, it more depends on the user and the services.

Daniel

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/282407b7-4693-4df2-9dc2-b9e0784f2cea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitri Maziuk

unread,
Apr 10, 2017, 10:55:29 AM4/10/17
to salt-...@googlegroups.com
On 2017-04-10 09:20, Daniel Wallace wrote:
> It all depends on how you want to maintain your files.
>
> Some users use the module directories for different services, some
> modify the main config file.
>
> I don't think it is SaltStack specific, it more depends on the user and
> the services.

Also on software version and distro: e.g. autofs in centos 7 will read
/etc/auto.master.d, in centos 6.current it presumably supports that but
is missing the required DLL. There's a open ticket in RedHat. In earlier
versions of autofs that wasn't even an option.

/etc/sudoers.d didn't exist a few years ago either.

>
> On Mon, Apr 10, 2017 at 3:32 AM, Thomas Güttler <guet...@gmail.com
> <mailto:guet...@gmail.com>> wrote:
>
> After thinking about it again, it is obvious, but I was blind first.
>
> I had a formular which modified /etc/sudoers
>
> But it I better practice to have a custom file in: /etc/sudoers.d/

Dima

Thomas Güttler

unread,
Apr 12, 2017, 3:42:57 AM4/12/17
to Salt-users


Am Montag, 10. April 2017 16:55:29 UTC+2 schrieb dmaziuk:
On 2017-04-10 09:20, Daniel Wallace wrote:
> It all depends on how you want to maintain your files.
>
> Some users use the module directories for different services, some
> modify the main config file.
>
> I don't think it is SaltStack specific, it more depends on the user and
> the services.

Also on software version and distro: e.g. autofs in centos 7 will read
/etc/auto.master.d, in centos 6.current it presumably supports that but
is missing the required DLL. There's a open ticket in RedHat. In earlier
versions of autofs that wasn't even an option.


Yes, but I think a general guideline can be found.

 
/etc/sudoers.d didn't exist a few years ago either.



Yes, that's true. On my servers it is always available. But this can be different, if you
need to support old operating systems.

Regards,
  Thomas Güttler

Dmitri Maziuk

unread,
Apr 12, 2017, 10:44:49 AM4/12/17
to salt-...@googlegroups.com
On 2017-04-12 02:42, Thomas Güttler wrote:
>
> Yes, but I think a general guideline can be found.
>

Currently the general guideline is the distro and software vendors move
towards .d/ setup if and where possible. As time permits. I don't know
of any general guideline for me as a user, except to look at a given
specific piece of software in detail.

Like I said, autofs is the same version on centos 6 and 7. The upstream
and centos 7 version support .d/, centos 6 build does not but has an
open ticket -- so hopefully it might support .d/ at some point. How do
you find a general guideline in that?

Dima


Thomas Güttler

unread,
Apr 13, 2017, 6:44:41 AM4/13/17
to Salt-users
After thinking about this again, the guideline could be:

If possible, avoid modifying/editing files via configuration management. Prefer to write/put whole files

What do you think?

I am not a native speaker. I guess a better wording could be used.

Regards,
  Thomas
Reply all
Reply to author
Forward
0 new messages