Ansible Redesign

Headline:
Ansible Redesign


Description:
Ansible encounters limitations in how it can function due to the way it was implemented in Morpheus. Efforts are underway to reorganize and redesign how Ansible functionality works in Morpheus, and I would like to get some feedback on some current ideas for more robust functionality. Here is the current list of ideas for this:

  • Allow user to specify python virtualenv to pin ansible version/config
  • Decouple inventory from Ansible integration
    • Inventory types:
      • Manual entry
      • Script to generate
      • Select in Morpheus based on criteria:
        • Cloud
        • OS Type
        • Tags
        • Labels
        • App / App Tier
      • Test button to preview that inventory to make playbook targeting easier
      • Inventory would be a dropdown in the task, or an option to select at runtime
  • Verbosity selectable at the task level
  • When running an ansible playbook against multiple instances, the history for those instances should contain the ansible output, or at the very least, a link to the main ansible run’s output.
  • Allow passing of data from one playbook to another. Not sure how to do this one. I might have to write a plugin or module that calls back to morpheus to save a value to a var, and have it available in the injected vars of the next ansible task.

Possibly outside ansible:

  • Preview variables available to ansible during a run in the context of the target, if that target exists. Bonus points for clicking a variable name and having a popup with the language specific variable reference.
    • ie: “{{ morpheus[‘instance’][‘name’] }}”

Example/Use case(s):
Too many to list, but the aimed functionality with regards to selection ability would be based on the ansible inventory plugin: GitHub - gomorpheus/ansible-collection-morpheus-core