-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Enhancement] Clone objects #193
Comments
I'm not sure about this. Why not just copy the code, make changes to it and then run it? After all you already have the code for the first object (the source of the clone).
What would happen if you run the same playbook again? If the original is deleted, then you cannot copy it. Should the playbook fail because of the missing source (it wouldn't be idempotent), or should it run successfully to make it idempotent? |
Sorry, I was thinking about changing the name of an object e.g. a host and so my post is misleading. |
I'm still not sure about this. I think "you're holding it wrong" - your workflow seems to be at odds with Ansible. Here's an example playbook to clone things:
This copies So this seems easy enough to do. If you need a module for this, I'd be open to accept a PR, but I won't implement it. |
Description
It should be possible to clone objects by using the icinga director collection for ansible.
To clone objects is possible in the director gui and with 'icingacli director clone --from [options]' . To have clone, maybe you have to combine getting the object, generating a new one and deleting the old.
We often define new objects by cloning them in the gui, defining a new name and changing only some attributes like ip-address and display name for host objects. Sure, you can read the objects definition by an info-command and then create a new one defining all possible parameters, but it would be very handy to have a clone option. Clone also would make it easier to rename e.g. a host by clone it and remove the original object.
Additional information
...
The text was updated successfully, but these errors were encountered: