sap-linuxlab / community.sap_install

Automation for SAP - Collection of Ansible Roles for various SAP software installation
Apache License 2.0
54 stars 57 forks source link

Collection: Add playbook for direct execution #842

Closed rhmk closed 2 months ago

rhmk commented 2 months ago

These are 2 playbooks which are added to the playbooks directory.

sean-freeman commented 2 months ago

I'm inclined to reject the principle behind this PR:

If this is needed for some downstream purpose to provide Support or cleaner end-user "Just Run This" documentation/functionality, then I would suggest this code is instead added into the vendor-specific fork (aka. midstream).

berndfinger commented 2 months ago

If this is needed for some downstream purpose to provide Support or cleaner end-user "Just Run This" documentation/functionality, then I would suggest this code is instead added into the vendor-specific fork (aka. midstream).

Having playbooks which can be called directly after installing the collection (including upstream collections) has the following advantages:

Because we will be leaving the existing sample playbooks with the dashes in their names untouched, existing functionality and scope will remain in place. See also https://github.com/sap-linuxlab/community.sap_install/issues/726 .

rhmk commented 2 months ago

@sean-freeman

  1. As Bernd said - these playbooks cannot be called directly after installing the collection due to the dash in the name
  2. the playbook adapts dynamically to localhost, all or any possible group defined inventory, so that the targets are not hardcoded as in sample- playbooks. This is a key reason to have them implemented from point of view.
  3. I agree, that the two-tier playbook structure may look confusing, but it is an interactive "pre-playbook" that collects variables for easy entry, the second one is so generic that it can be used almost anywhere (e.g by the ansible playbooks), it just calls two roles and it works.

My intervention is indeed to move away from sample- mid-term and have callable playbooks that can be imported with a few parameters, to do what is needed. I think we can discuss about the "parameter asking playbook" to have this in downstream only, but the _exec playbook is worth putting here.

rhmk commented 2 months ago

The PR is BTW a reaction to users who asked for a "directly usable" playbook

rhmk commented 2 months ago

Removed the interactive part to provide a vendor-specific version of it and suggest to go forward with this PR. It makes the roles much easier consumable and reusable, e.g. in ansible-playbooks4sap