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

Added a way to adjust resolvconf search domains #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olafnorge
Copy link

@olafnorge olafnorge commented Oct 16, 2017

added resolver_search_domains variable in order to set search domains like example.com, example.net, etc. to the resolv.conf

fixes: #17

…ns like `example.com`,

`example.net`, etc. to the resolv.conf
@trombik
Copy link
Contributor

trombik commented Oct 17, 2017

it would be frustrating for contributors not to be able to see the jenkins log, but we do not have a plan to expose our the web UI to public. you can test roles in your local environment. for details, see:

@trombik
Copy link
Contributor

trombik commented Oct 17, 2017

Failures:

  1) File "/etc/resolvconf.conf" content should match /name_servers="192\.168\.1\.2 192\.168\.1\.3 192\.168\.1\.1"\nsearch_domains="example\.com example\.net"/
     On host `127.0.0.1'
     Failure/Error: its(:content) { should match(/name_servers="192\.168\.1\.2 192\.168\.1\.3 192\.168\.1\.1"\nsearch_domains="example\.com example\.net"/) }
       expected "name_servers=\"192.168.1.3 192.168.1.1 192.168.1.2\"\nsearch_domains=\"example.com example.net\"\n" to match /name_servers="192\.168\.1\.2 192\.168\.1\.3 192\.168\.1\.1"\nsearch_domains="example\.com example\.net"/
       Diff:
       @@ -1,2 +1,3 @@
       -/name_servers="192\.168\.1\.2 192\.168\.1\.3 192\.168\.1\.1"\nsearch_domains="example\.com example\.net"/
       +name_servers="192.168.1.3 192.168.1.1 192.168.1.2"
       +search_domains="example.com example.net"
       sudo -p 'Password: ' /bin/sh -c cat\ /etc/resolvconf.conf\ 2\>\ /dev/null\ \|\|\ echo\ -n
       name_servers="192.168.1.3 192.168.1.1 192.168.1.2"
search_domains="example.com example.net"

     # ./tests/serverspec/search_spec.rb:6:in `block (2 levels) in <top (required)>'

  2) File "/etc/resolv.conf" content should match /nameserver 192\.168\.1\.2\nnameserver 192\.168\.1\.3\nnameserver 192\.168\.1\.1\nsearch example\.com example\.net/
     On host `127.0.0.1'
     Failure/Error: its(:content) { should match(/nameserver 192\.168\.1\.2\nnameserver 192\.168\.1\.3\nnameserver 192\.168\.1\.1\nsearch example\.com example\.net/) }
       expected "nameserver 192.168.1.3\nnameserver 192.168.1.1\nnameserver 192.168.1.2\nsearch example.com example.net\n" to match /nameserver 192\.168\.1\.2\nnameserver 192\.168\.1\.3\nnameserver 192\.168\.1\.1\nsearch example\.com example\.net/
       Diff:
       @@ -1,2 +1,5 @@
       -/nameserver 192\.168\.1\.2\nnameserver 192\.168\.1\.3\nnameserver 192\.168\.1\.1\nsearch example\.com example\.net/
       +nameserver 192.168.1.3
       +nameserver 192.168.1.1
       +nameserver 192.168.1.2
       +search example.com example.net
       
     # ./tests/serverspec/search_spec.rb:22:in `block (2 levels) in <top (required)>'

Finished in 0.27221 seconds (files took 3.02 seconds to load)
3 examples, 2 failures

Failed examples:

rspec ./tests/serverspec/search_spec.rb:6 # File "/etc/resolvconf.conf" content should match /name_servers="192\.168\.1\.2 192\.168\.1\.3 192\.168\.1\.1"\nsearch_domains="example\.com example\.net"/
rspec ./tests/serverspec/search_spec.rb:22 # File "/etc/resolv.conf" content should match /nameserver 192\.168\.1\.2\nnameserver 192\.168\.1\.3\nnameserver 192\.168\.1\.1\nsearch example\.com example\.net/

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

Successfully merging this pull request may close these issues.

Add a way to adjust resolvconf search domains
2 participants