-
Notifications
You must be signed in to change notification settings - Fork 0
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
Design: Customizable Options for Provisioner with Documentation #84
Comments
@MarkProminic, would it be possible to override the properties (similar to this) in separate files in a "custom" directory, and then import them programatically after loading Hosts.yml? I can explain this more tomorrow, but I wanted to start brainstorming for this. |
The Whole point of the Hosts.yml was so that it could be copied from one persons machine to another as the Source of Truth. This defeats that purpose and why Hosts.yml was designed. I could refactor Hosts.rb to include extra directories to load additional variables from, however this is a major refactor and affects other projects like spinning up these exact instances on Bhyve in privately Hosted environments. A role is created to provision a service, But a Role will always defer to the any of the variables overridden via the Hosts.yml. This will take some time for me to fully grok what you are asking, but it does not seem easy. My Solution is to override variables in the Hosts.yml as I designed it. I would argue that splitting up things in a bunch of different directories rather than defining all the versions, names, passwords variables, etc in one file, would be more confusing to end users. |
The Hosts.yml is designed around the exact premise you made:
In regards to the point about:
That's precisely what the /meta/main.yml files are for in the Ansible roles . . and more specifically about:
That is what we define as our default, via the /defaults/main.yml files, IE; the versions that we build it with on release. If a user wants to override this, they simply redefine the variable to override it in the Hosts.yml, if not defined it defaults to to this. In regards to:
That's why roles are created, to be modular, simply copy a Role Folder of the task sequence you want, and make sure that your Hosts.yml has it defined in it to have Ansible call that Role. |
Unfortunately, we ran out of time to discuss this in today's meeting. I think some things were not clear from my writeup. Yes, What I am trying to do with these separate files could also be done in Hosts.yml. The scope for this proposal is limited to overriding properties in existing roles. I'm not opposed to keeping the overriding properties in Hosts.yml and then having a GUI to manage them. @JustinProminic was oppsed to having users work with Hosts.yml at this point, since it has gotten large, but it might not be a problem if this were abstracted. The design @JustinProminic proposed was update the properties in the role directories instead, so that we could be editing this in a more modular way. We were talking about editing the defaults file here, but I think there may be a more appropriate file here. I was asking about handling the overrides in seaprate files as an idea to manage the properties in smaller files like Justin wanted, but without needing to modify (and later merge) the existing files in the template. I'm not sure this is a great idea, but I wanted to at least explore it. Adding new roles or modifying existing roles would be outside the scope of this feature, at least for the GUI support. We could still let the user modify a copy of the local template as desired (or fork the repository and use it as a custom provisioner (#83). |
@JustinProminic talked today about a design for allowing the user to further customize the properties for the server or provisioner. For example, this would allow the user to add additional genesis_packages on the Vagrant side.
Requirements:
We'll discuss this more in the meeting tomorrow.
The text was updated successfully, but these errors were encountered: