Giter Site home page Giter Site logo

ansible-collection-morpheus-core's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-collection-morpheus-core's Issues

Change choices for FQCN compatibility

Modify the DOCUMENTATION block on line 24 of morpheus/core/plugins/inventory/morpheus_inventory.py and add to the choices: entry:

choices: ['morpheus_inventory', 'morpheus.core.morpheus_inventory']

Adding further modules

Hey,

Thanks for merging in my httpapi plugin and appliance_facts module!

As mentioned in the PR comments, I'm looking at creating further modules and happy to take requests.
At this point in time I have added a further two modules into my develop branch, an appliance_settings module and appliance_maintenance_mode module, both of which are ready to ship.

However, before I go ahead and raise a new PR, I wondered if there was any particular process you would like me to follow. I can't say how frequently I will create modules, as I'm doing it in my spare time, so it maybe somewhat sporadic, and dependent on the complexity of the module(s) at the time.

To keep the PR's small and easier to review I could just raise a PR as and when I complete each module, rather than throwing a bunch at you at once.

Let me know if there is anything else you would like me to consider, and if there are any particular modules you would like to see.

Many thanks

No hosts fetched

Hi,
Seems like after some updates that the plugin doesn't fetch any hosts from Morpheus, though it does create the hostgroups.
Do you have time for a call, since this always seems easier to resolve that way?

Read variable for morpheus url

Hey, just wondering if it's possible to read a variable, or read the morpheus appliance url instead of supplying the url?

Target instances only if the status is running

if the hosts list that is generated based on the searchtype and searchstring have instances which are not in the running status then the ansible execution fails. Option to set ignore instances which are not in the running state would be useful.

Running job on master tenant to subtenant hosts

I'm having an issue now with running jobs on Master Tenant, that is targeting hosts on a subtenant, seems like it finds the hosts, but it's not allowed to run any jobs against them. Is this something related to the context you mentioned yesterday, and anyway I could make this work?

Failed to parse morpheusinv.yml with auto plugin:

Morpheus version# 5.4.4-3
Ansible 2.9.5
installed collection via morpheus-local user

ansible-galaxy collection install morpheus.core
cp /opt/morpheus/.local/.ansible/collections/ansible_collections/morpheus/core/plugins/inventory/morpheus_inventory.py /usr/share/ansible/plugins/inventory/
bash-4.2$ ansible-doc -t inventory -l | grep morpheus
morpheus_inventory  Returns Ansible inventory from Morpheus   

The inventory fails to parse plugin

bash-4.2$ ansible-inventory -i /var/tmp/morpheusinv.yml --list -vvv
ansible-inventory 2.9.25
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/opt/morpheus/.local/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible-inventory
  python version = 2.7.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Using /etc/ansible/ansible.cfg as config file
host_list declined parsing /var/tmp/morpheusinv.yml as it did not pass its verify_file() method
script declined parsing /var/tmp/morpheusinv.yml as it did not pass its verify_file() method
toml declined parsing /var/tmp/morpheusinv.yml as it did not pass its verify_file() method
[WARNING]:  * Failed to parse /var/tmp/morpheusinv.yml with auto plugin: inventory config '/var/tmp/morpheusinv.yml' specifies unknown plugin builtins
  File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/inventory/auto.py", line 53, in parse
    raise AnsibleParserError("inventory config '{0}' specifies unknown plugin '{1}'".format(path, plugin_name))
[WARNING]:  * Failed to parse /var/tmp/morpheusinv.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory
  File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/inventory/yaml.py", line 112, in parse
    raise AnsibleParserError('Plugin configuration YAML file, not YAML inventory')
[WARNING]:  * Failed to parse /var/tmp/morpheusinv.yml with ini plugin: Invalid host pattern 'plugin:' supplied, ending in ':' is not allowed, this character is reserved to provide a port.
  File "/usr/lib/python2.7/site-packages/ansible/inventory/manager.py", line 280, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/usr/lib/python2.7/site-packages/ansible/plugins/inventory/ini.py", line 138, in parse
    raise AnsibleParserError(e)
[WARNING]: Unable to parse /var/tmp/morpheusinv.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
    "_meta": {
        "hostvars": {}
    }, 
    "all": {
        "children": [
            "ungrouped"
        ]
    }
}
bash-4.2$ ls -l /var/tmp/morpheusinv.yml 
-rw-r--r--. 1 morpheus-local morpheus-local 246 Apr  7 09:50 /var/tmp/morpheusinv.yml
bash-4.2$ cat /var/tmp/morpheusinv.yml 
plugin: morpheus_inventory
groups:
  - name: sql
    searchtype: label
    searchstring: centos
morpheus_url: "https://10.32.20.80/"
morpheus_api_key: <redacted>
morpheus_ssl_verify: no

any ideas what I am missing

Issues with fetching hosts on 0.2.3

Hi, after upgrading Morpheus to 5.4.5 and the inventory plugin to 0.2.3, it's no longer fetching hosts nor creating any of the groups?
I even tested in a virtualenv like you've suggested before.

(venv) morpheus-local@S700LS001:~/collectiontesttmp$ ansible-inventory -i morpheusinv.yml --list -vvvvvv
ansible-inventory [core 2.11.6]
  config file = None
  configured module search path = ['/opt/morpheus/.local/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible
  ansible collection location = /opt/morpheus/.local/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/morpheus/.local/collectiontesttmp/venv/bin/ansible-inventory
  python version = 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
No config file found; using defaults
setting up inventory plugins
host_list declined parsing /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml as it did not pass its verify_file() method
script declined parsing /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml as it did not pass its verify_file() method
Loading collection morpheus.core from /opt/morpheus/.local/.ansible/collections/ansible_collections/morpheus/core
morpheus_inventory: Using Morpheus URL from inventory file
morpheus_inventory: Using Morpheus token from inventory file
toml declined parsing /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml as it did not pass its verify_file() method
[WARNING]:  * Failed to parse /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml with auto plugin: 'NoneType' object is not subscriptable
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/inventory/manager.py", line 290, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/plugins/inventory/auto.py", line 58, in parse
    plugin.parse(inventory, loader, path, cache=cache)
  File "/opt/morpheus/.local/.ansible/collections/ansible_collections/morpheus/core/plugins/inventory/morpheus_inventory.py", line 353, in parse
    self._set_version_from_morpheus()
  File "/opt/morpheus/.local/.ansible/collections/ansible_collections/morpheus/core/plugins/inventory/morpheus_inventory.py", line 78, in _set_version_from_morpheus
    self.print_verbose_message(self.extravars['morpheus']['morpheus'])
[WARNING]:  * Failed to parse /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml with yaml plugin: Plugin configuration YAML file, not YAML inventory
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/inventory/manager.py", line 290, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/plugins/inventory/yaml.py", line 112, in parse
    raise AnsibleParserError('Plugin configuration YAML file, not YAML inventory')
[WARNING]:  * Failed to parse /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml with ini plugin: Invalid host pattern 'plugin:' supplied, ending in ':' is not allowed, this character is reserved to provide a port.
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/inventory/manager.py", line 290, in parse_source
    plugin.parse(self._inventory, self._loader, source, cache=cache)
  File "/opt/morpheus/.local/collectiontesttmp/venv/lib/python3.8/site-packages/ansible/plugins/inventory/ini.py", line 136, in parse
    raise AnsibleParserError(e)
[WARNING]: Unable to parse /opt/morpheus/.local/collectiontesttmp/morpheusinv.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
    "_meta": {
        "hostvars": {}
    },
    "all": {
        "children": [
            "ungrouped"
        ]
    }
}



Verbose output

Need better debug/verbose output for helping to troubleshoot user issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.