-
Notifications
You must be signed in to change notification settings - Fork 897
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
Seed plugin ansible content #18844
Seed plugin ansible content #18844
Conversation
lib/ansible/content.rb
Outdated
@@ -1,5 +1,7 @@ | |||
module Ansible | |||
class Content | |||
PLUGIN_CONTENT_DIR = Rails.root.join("content", "ansible").to_s.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this directory because we always intended that the content directory of manageiq core could also be pluggable (that is, it could bring its own content things as well). We might want another directory that's not /content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm fine with putting this somewhere else, but I wanted it to be in the source tree so that we could get at it when running locally.
That said, even if there were playbooks here as you describe, the behavior wouldn't really be any different right? We would then just have to copy those from here to the new location anyway so I don't really see any harm in keeping this.
Overall looks good, but I'm not sure about the location or the timing of when it's run. |
private | ||
|
||
def create_local_playbook_repo | ||
Ansible::Content.consolidate_plugin_playbooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're still looking for names... mishmash, mingle, hodgepodge, amalgam, merge
f40b9b4
to
2487556
Compare
This will be used for downloading roles for user-provided ansible content as well as content provided by plugins.
The roles dir in this directory should be added to the default roles search path for your ansible config to make the roles provided by plugins available for all playbook runs. This is done on the appliance in the /root/.ansible.cfg file, but for local development you will need to make this configuration change manually in whatever way seems best for you.
This repo will contain any ansible content from plugins which want playbooks exposed directly to users for use as service targets or from within automate.
This is because in the future content/ansible should be reserved for when the manageiq core repo wants to provide playbooks to the repo we make out of all the plugin repos
2487556
to
1078773
Compare
1078773
to
6296ce5
Compare
Some comments on commits carbonin/manageiq@70f8291~...6296ce5 lib/tasks/evm_ansible_runner.rake
|
Checked commits carbonin/manageiq@70f8291~...6296ce5 with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
@Fryguy @NickLaMuro Any other thoughts on this one? |
This allows plugins (like manageiq-content) to provide ansible playbooks and roles to embedded ansible.
The directory trees at
/content/ansible
in the plugins will be merged into the/content/ansible_consolidated
directory in the manageiq repo root directory. From there theroles
directory should be added to theroles_path
in your local ansible config (and is added to the path on the appliance by the changes in ManageIQ/manageiq-appliance#240) so that all playbooks will have access to the roles provided by plugins.The playbooks in the
/content/ansible_consolidated
directory will be available in a special playbook repository and can be used as targets for service templates and/or automate methods.NOTE: As of now, plugin roles are not fetched from ansible-galaxy if a requirements file is provided.