Skip to main content

Ansible Modules for Morpheus Data

Project description

Ansible Modules Morpheus

PyPi MIT License

Install this module:

  • via pip
pip install ansible-modules-morpheus
  • via ansible-galaxy
ansible-galaxy install 'git+https://github.com/gomorpheus/ansible-modules-morpheus.git'

Environment Variables

If you choose to use env vars the following variables can be exported to the environment you are controlling with ansible in order to authenticate to your Morpheus Appliance:

  • MORPH_ADDR : url for Morpheus Appliance
  • MORPH_AUTHTYPE: authorization type for Morpheus (token or userpass)
  • MORPH_USER: Morpheus appliance username for userpass authtype
  • MORPH_PASSWORD: Morpheus appliance user password for userpass authtype
  • MORPH_TOKEN: Morpheus api token for token authtype
  • MORPH_SSL_VERIFY: Boolean for verifying ssl

Addition variables for specific modules:

  • MORPH_SECRET: Morpheus secret key for Cypher value reads in morph_cypher module

Arguments

Alternatively you can pass arguments to the module by using discrete variables in your task module. Args that are supported are:

  • baseurl: url for Morpheus Appliance
  • authtype: authorization type for Morpheus (token or userpass)
  • api_token: Morpheus api token for token authtype
  • username: Morpheus appliance username for userpass authtype
  • password: Morpheus appliance user password for userpass authtype
  • ssl_verify: Boolean for verifying SSL

For specific modules

  • secret_key: Morpheus secret key for Cypher value reads in morph_cypher module

Module Examples

morph_cypher

- hosts: foo
  tasks:
    - name: gettoken
      morph_cypher:
        baseurl: "https://sandbox.morpheusdata.com"
        secret_key: "password/spark"
        authtype: token
        ssl_verify: False
      register: results
    - debug: var=results.secret

or explicitly passing the api_token as a var:

- hosts: foo
  tasks:
    - name: gettoken
      morph_cypher:
        baseurl: "https://sandbox.morpheusdata.com"
        secret_key: "secret/nooneknows"
        authtype: token
        api_token: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      register: results

Lookup Plugin Examples

morph_cypher

- debug:
    msg: "{{ lookup('morph_cypher', 'baseurl=https://sandbox.morpheusdata.com authtype=token api_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx secret_key=password/spark')}}"

- debug:
    msg: "{{ lookup('morph_cypher', 'baseurl=https://sandbox.morpheusdata.com authtype=userpass username=slim_shady password=password secret_key=secret/hello') }}"

- debug:
    msg: "{{ lookup('morph_cypher', 'baseurl=https://sandbox.morpheusdata.com authtype=token api_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ssl_verify=False secret_key=key/256/myKey') }}"

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible-modules-morpheus-0.1.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_modules_morpheus-0.1.2-py2-none-any.whl (7.8 kB view details)

Uploaded Python 2

File details

Details for the file ansible-modules-morpheus-0.1.2.tar.gz.

File metadata

  • Download URL: ansible-modules-morpheus-0.1.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for ansible-modules-morpheus-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dafa2db55bca181ed2d5c8db8ce8e45cc1f96fcae22679a6ee788a7001cbfd7f
MD5 e3d0a32dab95714690587681cbe5ac9f
BLAKE2b-256 bf9bc6d2414b3fc141a3a9e98cf77f7f6a2240dcb0274f823841d9ed37837ecc

See more details on using hashes here.

File details

Details for the file ansible_modules_morpheus-0.1.2-py2-none-any.whl.

File metadata

  • Download URL: ansible_modules_morpheus-0.1.2-py2-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/2.7.15

File hashes

Hashes for ansible_modules_morpheus-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 a45b07e28bac6b65f0da420bdcd26b2529ac1645c120a14dce42cef7650e315f
MD5 022fcea2e4e4c2488f00d6c1faada299
BLAKE2b-256 cf6b4925876b15f28e9fa158ff307b5ceb3664018815d8e47adfa6da753ca126

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page