)]}'
{"tasks/lxc_cache_preparation.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"938ebe07ff4d952b06a62b2ea30c766c60149acd","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    - lxc-cache"},{"line_number":37,"context_line":"    - skip_ansible_lint"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"- name: Check for localhost resolvers"},{"line_number":40,"context_line":"  shell: |"},{"line_number":41,"context_line":"    EXIT\u003d0"},{"line_number":42,"context_line":"    for i in $(grep nameserver /etc/resolv.conf | awk \u0027{print $2}\u0027); do"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3ac371cc_cf7c0375","line":39,"updated":"2016-08-15 18:20:34.000000000","message":"I guess this task could be replaced by two - one the slurps the file content and one that replaces the localhost entry. This would assume, of course, that there\u0027s an ansible variable for the default route interface.\n\nThis is OK, and a single task with change detection, but I thought I\u0027d raise the concept as a possible alternative.","commit_id":"7010e1d45281b72d5dbe47eb822f37b8dd466135"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"938ebe07ff4d952b06a62b2ea30c766c60149acd","unresolved":false,"context_lines":[{"line_number":39,"context_line":"- name: Check for localhost resolvers"},{"line_number":40,"context_line":"  shell: |"},{"line_number":41,"context_line":"    EXIT\u003d0"},{"line_number":42,"context_line":"    for i in $(grep nameserver /etc/resolv.conf | awk \u0027{print $2}\u0027); do"},{"line_number":43,"context_line":"      if [[ \u0027localhost\u0027 \u003d\u003d \"$i\" ]] || [[ \"$(echo $i | grep \u0027^127\u0027)\" ]]; then"},{"line_number":44,"context_line":"        echo \"nameserver $(ip route get 1 | awk \u0027NR\u003d\u003d1 {print $NF}\u0027)\" \u003e /var/lib/lxc/LXC_NAME/rootfs/etc/resolv.conf \\"},{"line_number":45,"context_line":"        EXIT\u003d3"},{"line_number":46,"context_line":"        break"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3ac371cc_cf20839e","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":76},"updated":"2016-08-15 18:20:34.000000000","message":"This will activate if *any* line in resolv.conf has localhost/127.* - if there are several other entries and those work, then is this the behaviour we want?\n\nIn my mind this makes sense to activate if this is the *only* nameserver entry in the file.","commit_id":"7010e1d45281b72d5dbe47eb822f37b8dd466135"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"4b595643a9f52b6e71c2dc10866b2caf88baf8f1","unresolved":false,"context_lines":[{"line_number":39,"context_line":"- name: Check for localhost resolvers"},{"line_number":40,"context_line":"  shell: |"},{"line_number":41,"context_line":"    EXIT\u003d0"},{"line_number":42,"context_line":"    for i in $(grep nameserver /etc/resolv.conf | awk \u0027{print $2}\u0027); do"},{"line_number":43,"context_line":"      if [[ \u0027localhost\u0027 \u003d\u003d \"$i\" ]] || [[ \"$(echo $i | grep \u0027^127\u0027)\" ]]; then"},{"line_number":44,"context_line":"        echo \"nameserver $(ip route get 1 | awk \u0027NR\u003d\u003d1 {print $NF}\u0027)\" \u003e /var/lib/lxc/LXC_NAME/rootfs/etc/resolv.conf \\"},{"line_number":45,"context_line":"        EXIT\u003d3"},{"line_number":46,"context_line":"        break"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3ac371cc_511a237e","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":76},"in_reply_to":"3ac371cc_cf20839e","updated":"2016-08-17 05:55:33.000000000","message":"Yes the intention here is to detect the presence of a localhost forwarding resolver and simply bind the containers to that.  The idea being that, IF, a localhost resolver is on the physical host we can reliably use that resolver for all containers on that host machine without assuming the containers have access to other resolvers which potentially reside outside a given containers network access. \n\nBy adding this to the cache create process we also allow a deployer to change the resolvers within the cache on rebuild should the host infrastructure not use localhost forwarding in the future.","commit_id":"7010e1d45281b72d5dbe47eb822f37b8dd466135"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"938ebe07ff4d952b06a62b2ea30c766c60149acd","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    EXIT\u003d0"},{"line_number":42,"context_line":"    for i in $(grep nameserver /etc/resolv.conf | awk \u0027{print $2}\u0027); do"},{"line_number":43,"context_line":"      if [[ \u0027localhost\u0027 \u003d\u003d \"$i\" ]] || [[ \"$(echo $i | grep \u0027^127\u0027)\" ]]; then"},{"line_number":44,"context_line":"        echo \"nameserver $(ip route get 1 | awk \u0027NR\u003d\u003d1 {print $NF}\u0027)\" \u003e /var/lib/lxc/LXC_NAME/rootfs/etc/resolv.conf \\"},{"line_number":45,"context_line":"        EXIT\u003d3"},{"line_number":46,"context_line":"        break"},{"line_number":47,"context_line":"      fi"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3ac371cc_af0ee731","line":44,"range":{"start_line":44,"start_character":27,"end_line":44,"end_character":67},"updated":"2016-08-15 18:20:34.000000000","message":"Is there perhaps an ansible variable for the interface that holds the default route?","commit_id":"7010e1d45281b72d5dbe47eb822f37b8dd466135"}]}
