Skip to content

how to pass --dns to terraform-plan or terraform-apply?? #300

Closed Answered by SteveDevOps
SteveDevOps asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, finally found a solution if anyone stumbles on this. This was the only thing that worked consistently for me and I preferred DrStrangeLove's answer in this stack link. Peace.

` #this is the way :P where x.x.x.x are actual IP addresses of nameservers you need to enforce

  - name: Set Docker DNS  
  
    run: |  

      sudo systemctl stop docker  

      tmp=$(mktemp)  

      sudo jq '.+{dns:["x.x.x.x","x.x.x.x","x.x.x.x","x.x.x.x"]}' /etc/docker/daemon.json > "$tmp"  

      sudo mv "$tmp" /etc/docker/daemon.json  

      sudo cat /etc/docker/daemon.json  

      sudo systemctl start docker`

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dflook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant