ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
113 stars 18 forks source link

Improve 'mazer list' output, add fully qualified output. Fixes #196 #275

Closed alikins closed 5 years ago

alikins commented 5 years ago
SUMMARY

Improve 'mazer list' output, add fully qualified output.

Fixes #196

Add 'list --full' to list fully qualified collection names. Make the default output more human readable, especially the '--content' output.

ie, list the collection and content names as they would be referenced from a playbook.

Also include the 'python path' name for plugins/module_utils.

For ex:

To show collections content with the full names you need to use from a playbook, use 'mazer list --content --full'

$ mazer list --content --full
 alikins.collection_inspect,0.0.48
  - roles
    - alikins.collection_inspect.test_collection_inspect
  - modules
    - alikins.collection_inspect.collection_inspect_no_module_utils
    - alikins.collection_inspect.collection_inspect
    - alikins.collection_inspect.get_collection_inspect
  - callback
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.callback.collection_inspect
  - lookup
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.lookup.collection_inspect
  - vars
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.vars.collection_inspect
  - action
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.action.collection_inspect
  - filter
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.filter.collection_inspect
  - module_utils
    - alikins.collection_inspect.collection_inspect
      - (python path) ansible_collections.alikins.collection_inspect.plugins.module_utils.collection_inspect

The new default 'mazer list' format

(mazer_0.4.0_py36) [newswoop:F29:mazer (list_output_collection_196 %)]$ mazer list
alikins.collection_inspect,0.0.48
alikins.collection_ntp,0.1.182
alikins.collection_reqs_test,2.1113.57

The 'mazer list --content' output (mazer_0.4.0_py36) [newswoop:F29:mazer (list_output_collection_196 %)]$ mazer list --content alikins.collection_inspect,0.0.48

ISSUE TYPE
MAZER VERSION
name = mazer
version = 0.5.0
config_file = /home/adrian/.ansible/mazer.yml
uname = Linux, newswoop, 5.0.5-200.fc29.x86_64, #1 SMP Wed Mar 27 20:58:04 UTC 2019, x86_64
executable_location = /home/adrian/venvs/mazer_0.4.0_py36/bin/mazer
python_version = 3.6.8 (default, Jan 27 2019, 09:00:23) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)]
python_executable = /home/adrian/venvs/mazer_0.4.0_py36/bin/python
ADDITIONAL INFORMATION