Discussion:
[salt-users] set search domain
Bálint Szigeti
2016-02-04 11:30:23 UTC
Permalink
hello

does anyone know how I could set searching domain to Linux box without
file.managed module?

using file.managed module is like ansible, using a secure channel to
replace files.

my prefer mode would be network module or something like 'dns module'.

Szigeti Bálint
--
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.
For more options, visit https://groups.google.com/d/optout.
V42
2016-02-04 16:33:45 UTC
Permalink
You could be a bit creative with the cmd.run state/& module and sed/awk replace/insert into /etc/resolv.conf...

Though, that might be too much of a hack for production
hello
does anyone know how I could set searching domain to Linux box without file.managed module?
using file.managed module is like ansible, using a secure channel to replace files.
my prefer mode would be network module or something like 'dns module'.
Szigeti Bálint
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
For more options, visit https://groups.google.com/d/optout.
--
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.
For more options, visit https://groups.google.com/d/optout.
Florian Ermisch
2016-02-04 16:42:06 UTC
Permalink
How about the other file.* state functions like file.append?

BTW: when you have the pkg resolvconf on your linux-host you have to change files in /etc/resolvconf/resolved.conf.d to get persistent changes.

Regards, Florian
Post by V42
You could be a bit creative with the cmd.run state/& module and
sed/awk replace/insert into /etc/resolv.conf...
Though, that might be too much of a hack for production
Post by Bálint Szigeti
hello
does anyone know how I could set searching domain to Linux box
without file.managed module?
Post by Bálint Szigeti
using file.managed module is like ansible, using a secure channel to
replace files.
Post by Bálint Szigeti
my prefer mode would be network module or something like 'dns
module'.
Post by Bálint Szigeti
Szigeti Bálint
--
You received this message because you are subscribed to the Google
Groups "Salt-users" group.
Post by Bálint Szigeti
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout.
--
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.
For more options, visit https://groups.google.com/d/optout.
V42
2016-02-04 17:18:42 UTC
Permalink
Hmm, looking at the docs I'd use file.replace with a regex.

About resolvconf, that's technically correct, but it depends on the OS. My Arch boxes doesn't use that package for example. It would also be persistent, as long as the salt-minion starts after the resolvconf process. The minion would run highstate as soon as it connects to the master. Again, it's a dirty hack...
Post by Florian Ermisch
How about the other file.* state functions like file.append?
BTW: when you have the pkg resolvconf on your linux-host you have to change files in /etc/resolvconf/resolved.conf.d to get persistent changes.
Regards, Florian
Post by V42
You could be a bit creative with the cmd.run state/& module and
sed/awk replace/insert into /etc/resolv.conf...
Though, that might be too much of a hack for production
Post by Bálint Szigeti
hello
does anyone know how I could set searching domain to Linux box
without file.managed module?
Post by Bálint Szigeti
using file.managed module is like ansible, using a secure channel to
replace files.
Post by Bálint Szigeti
my prefer mode would be network module or something like 'dns
module'.
Post by Bálint Szigeti
Szigeti Bálint
--
You received this message because you are subscribed to the Google
Groups "Salt-users" group.
Post by Bálint Szigeti
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
For more options, visit https://groups.google.com/d/optout.
--
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.
For more options, visit https://groups.google.com/d/optout.
Florian Ermisch
2016-02-04 23:05:16 UTC
Permalink
Oh, right, `file.replace()` was the one with `append_if_not_found=`!

resolvconf is a tricky one. On Linux I would always create the files in `resolv.conf.d` in case it's pulled in via some stupid dependency (just as I create that file to disable the freakin' network-manager).
It's also no real service and can get triggered by changed state of interfaces.

Only on OpenBSD I would trust on resolvconf never showing up to screw up name resolution.

regards, Florian
Post by V42
Hmm, looking at the docs I'd use file.replace with a regex.
About resolvconf, that's technically correct, but it depends on the
OS. My Arch boxes doesn't use that package for example. It would also
be persistent, as long as the salt-minion starts after the resolvconf
process. The minion would run highstate as soon as it connects to the
master. Again, it's a dirty hack...
On 04 Feb 2016, at 17:42, Florian Ermisch
How about the other file.* state functions like file.append?
BTW: when you have the pkg resolvconf on your linux-host you have to
change files in /etc/resolvconf/resolved.conf.d to get persistent
changes.
Regards, Florian
Post by V42
You could be a bit creative with the cmd.run state/& module and
sed/awk replace/insert into /etc/resolv.conf...
Though, that might be too much of a hack for production
Post by Bálint Szigeti
On 04 Feb 2016, at 12:30, Bálint Szigeti
hello
does anyone know how I could set searching domain to Linux box
without file.managed module?
Post by Bálint Szigeti
using file.managed module is like ansible, using a secure channel
to
Post by V42
replace files.
Post by Bálint Szigeti
my prefer mode would be network module or something like 'dns
module'.
Post by Bálint Szigeti
Szigeti Bálint
--
You received this message because you are subscribed to the Google
Groups "Salt-users" group.
Post by Bálint Szigeti
To unsubscribe from this group and stop receiving emails from it,
For more options, visit https://groups.google.com/d/optout.
--
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,
For more options, visit https://groups.google.com/d/optout.
--
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.
For more options, visit https://groups.google.com/d/optout.
Loading...