Code Monkey home page Code Monkey logo

Comments (6)

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

andymcc: I'm not sure we can fix this in a sensible way since some hosts will have the same IP (nova-compute and a physical host, for example) - I think we are better off investigating how to prevent "unmanaged" nodes (nodes not in the inventory) from existing. So guarding against having 2 different inventory files (different sets of containers on the same IPs etc).

from ansible-lxc-rpc.

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

apsu: It might help to provide another bit of context to consider here.

Ansible used to ship a "host" module which would attempt to manage your /etc/hosts file for you. Our own dear claco pointed out an issue with how it handled aliases -- exactly as you're seeing even with just lineinfile -- and the module got pulled from Ansible and hasn't yet been replaced.

The usual solution I see in playbooks for dealing with /etc/hosts is to use a template and render it with exactly the contents that host should have, rather than lineinfile.

That said... if you Want the old host module to poke at, I actually have it stashed away in my ansible fork I use with my dockerlab/virtlab repos, since I find it useful for most /etc/hosts tasks. It's located here: https://github.com/Apsu/ansible/blob/dockerlab/library/system/host

from ansible-lxc-rpc.

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

claco: Some people who have simple needs, use the 'line in file' module with regex/replace.

from ansible-lxc-rpc.

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

andymcc: PR'd against this on new repo #1

from ansible-lxc-rpc.

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

andymcc: Fixed in local branch: Fixed in local branch: https://github.com/andymcc/ansible-lxc-rpc/tree/hosts_duplicate

from ansible-lxc-rpc.

d34dh0r53 avatar d34dh0r53 commented on July 21, 2024

Can this issue be closed?

from ansible-lxc-rpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.