-
Notifications
You must be signed in to change notification settings - Fork 351
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
New set of DebOps scripts #1455
Conversation
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 went ahead and pushed small fixes to your branch in order to save time. Let me know if that works for you.
This looks good. Just some input about the interface to Ansible. I would try to keep the run
and check
subcommands a small wrapper around the Ansible commands, potentially passing all further arguments for the Ansible based subcommands directly without further parsing. That is just from my usage of DebOps. I just call ansible-playbook directly.
For me, the real benefit we can provide with the DebOps scripts is debops/debops-tools#164.
Thanks. I'm not sure how you managed to do that, I guess write status on th I actually wanted to siwtch the owner email to
That's what I plan to do. The
We're starting from scratch so we can make things better - for example I'd like to |
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 making a note to update CLI Doc with the new usage. I might be a while, though... still crunching like a madman on my deployment.
bb9f76a
to
cd7daed
Compare
2eaa87a
to
04a7033
Compare
Removing that directory might break the "editable" install mode.
With these changes, the reach of Ansible during execution should be well scoped inside of the 'ansible/collections/' subdirectory without exposing other pieces of code outside of it.
This patch adds the ProjectDir class which defines basic DebOps project directory structure. If needed, the class can create the project directory on initialization and populate it with configuration files.
This patch adds support for generation of the 'ansible.cfg' configuration file in the DebOps project directories. The configuration contents are based on a basic template, user-specific configuration is applied on top of the basic configuration.
The '--project-dir' option can be used to specify the path to the DebOps project directory in subcommands which rely on it. This can be useful if the 'debops' script is executed from outside of a valid DebOps project directory.
The 'debops run' and 'debops check' commands can be used to execute Ansible playbooks against hosts, or check any changes when they are applied, respectively. Playbooks can be specified either as direct paths to files with or without the '.yml' extansion, or defined as '<namespace>.<collection/><path/to/playbook>' strings which will be expanded by DebOps to use playbooks included in Ansible Collections.
This patch should ensure that Ansible Collections installed by the user either in the project directory or in the user's home directory take precendence over collections included with the 'debops' Python package.
Previously in the DebOps configuration structure, the current project configuration was nested under ['projects'][name] key. This could be used to modify specific project options from the global configuration, however this caused the per-project configuration to require nesting each time. This patch changes the code so that the per-project configuration is on the same level as global configuration. This should make the per-project config files easier to write and understand. The global state between DebOps project can be handled some other way in the future.
Ansible can find roles correctly inside of a Collection when the 'collections:' keyword is specified in a playbook.
04a7033
to
4742c3b
Compare
18f5a37
to
3e1d6b5
Compare
No description provided.