Skip to main content

Ansible Modules for Morpheus Data

Project description

Ansible Modules Morpheus

Latest Version License: MIT

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.2.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

ansible_modules_morpheus-0.2.0-py2-none-any.whl (7.9 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: ansible-modules-morpheus-0.2.0.tar.gz
  • Upload date:
  • Size: 6.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5abfb1568678ccea1864bb82c6954cff3ccb40b07240206c142b5f4b39e782fb
MD5 6f9a71cc6b860fa4d76f38bbcc71d2cf
BLAKE2b-256 ca0a2ab82ff4dd929253ebd5b387c1093a69f4ffd72aa38a19cb03e65a7bb245

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ansible_modules_morpheus-0.2.0-py2-none-any.whl
  • Upload date:
  • Size: 7.9 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.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 8724a8e01fd0aaf3726d951e24109aa6b5e26abdedf7489d15971d90d5a7c5fe
MD5 68a3b4adde25e7365139fc74200c0f6f
BLAKE2b-256 85a8d5a517559ff5d4dadaef1360f61ca8fe99bcd6fbb86393a49f822d944a66

See more details on using hashes here.

Supported by

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