Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
add add_host action plugin - add hosts to inventory during a playbook #1491
This comment has been minimized.
This comment has been minimized.
I am thinking we need a way to persist inventory to make this really workable.
Thus, it seems, we really have to make the inventory objects serializable.
This opens a whole other can of worms as we don't want to rewrite that file in place, and some of the inventory variables are also made available with group_vars/host_vars.
I am tentatively thinking that this doesn't become a core plugin for that reason. I WANT it to be, but we have to solve those problems first.
If you are using EC2/other as a remote inventory source, maybe all you need is a way to invalidate the cache from the inventory source?
To me, it feels weird to be in core.
I really want ansible to be about configuring hosts, but I'm still confused
There is a chicken-egg scenario there. It's designed for configuring
It seems if you were to create a host using, say, Eucalyptus, and were
Thus this is why I'm drawn about ansible-provisoning in general. I am
I kind of like knife's syntax for host creation -- yes, it helps you create
On Tue, 30 Oct 2012, Michael DeHaan wrote:
So I can create the host all I want right now - and then run a playbook
But that's the whole point of this.
I have a profile of host (let's say builder). I want to launch a
They get to use it - then the box goes 'boom' and is gone. If I want to
or maybe I'm misunderstanding your concerns.
Yeah I think I follow your point of usage.
I think I want to enforce that the hosts /do/ get added to inventory.
The way I would probably have done is it I would have a script that installs the new guest, fairly bare bones, not driven by an ansible playbook at all...
and then at the end of that it finishes with calling
ansible-playbook -i "192.168.10.50," playbook.yml
The idea of using ansible to drive the very top layer of provisioning is fine if people want to do it, but to me, perhaps based on whether I come from with Cobbler land and so forth, feels weird to me.
I see it as "provision -- then run ansible"
So, BYOP(provisioning) basically.
I also have this rather baseless though that I want to keep the module list in core /reasonably/ short, so if a module is to drop in core I want it to be something a really large amount of people are going to want to use, as there's a cognitive need to at least skim over all of them, and gut feel is this one is a little weird.
That all being said, I understand your use case. It just seems like it's an ansible-provisioning thing to me, and I am (off list) talking to dag a bit about possibly not making that part of the core project anyway. I just think it can be made a lot smoother and I'm not comfortable with ansible driving the top end of provisioning.
That being said, it clearly CAN do that, and I'm not going to stop that from happening either -- I just don't think I feel comfortable with that being the interface for how you describe how you create hosts.
okay - I am clearly confused.
How are you distinguishing creating a new instance and provisioning? What is it that you want to keep ansible separate from vs what cobbler does?
At this point I see ansible as primarily an orchestration tool. A way to perform a series of actions across multiple systems coordinating between them.
Remember rocketship recovery? That's what I'm thinking about.
I have 150 systems, I want to duplicate critical ones into the cloud in a single command. Some of them have persistent ips, some are just consumers and can have variable ips. But I do not want to set them up one by one.
I want to be able to write playbooks that describe setting up complete clusters of systems.
Which involves creating them, configuring them and dealing with their interconnectedness.
What part of that is something ansible should NOT do?
I don't remember rocketship recovery :)
I am not saying anything about what ansible shouldn't do. I'm saying I
If I deploy a machine into a cloud, I think it's important to be able to
Right now we don't have a way to do that.
I also think it should be easy to spin up new nodes and then tell ansible
This seems to be best done by output of provisioing tool into a temporary
If that tool existed, it could be decoupled by Ansible and used by a lot