Giter VIP home page Giter VIP logo

molecule-digitalocean's Introduction

Molecule DigitalOcean Plugin

PyPI Package

image

Python Black Code Style

Ansible Code of Conduct

Ansible mailing lists

Repository License

Molecule digitalocean is designed to allow use of digitalocean Cloud for provisioning test resources.

Documentation

Read the documentation and more at https://molecule.readthedocs.io/.

Get Involved

Authors

Molecule DigitalOcean Plugin was created by Sorin Sbarnea based on code from Molecule.

License

The MIT License.

The logo is licensed under the Creative Commons NoDerivatives 4.0 License.

If you have some other use in mind, contact us.

molecule-digitalocean's People

Contributors

ansible-zuul[bot] avatar danihodovic avatar mamercad avatar pabelanger avatar pre-commit-ci[bot] avatar ssbarnea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

molecule-digitalocean's Issues

Add usage examples

The molecule documentation doesn't provide any examples of how to use third party drivers AFAIK. Could you provide some here?

๐Ÿ’– Molecule-digitalocean is looking for maintainers

The current status of this driver is unmaintained and I am looking forward to handle its maintenance to someone that wants to assure molecule can use this driver.

Unless we find a maintainer this driver will be removed from molecule all-in-one container.

I will support with CI/CD guidance and help.

Installation instructions missing/outdated

Looking into how to install molecule-digitalocean, I ended up looking through driver.py since I couldn't find any other documentation.

There it says:

$ pip install 'molecule[digitalocean]'

However, this doesn't seem to work anymore:

WARNING: molecule 3.1.0 does not provide the extra 'digitalocean'

The instructions should probably be updated.

Filter molecule_header & molecule_from_yaml missing

ISSUE

Following filters are missing

  • molecule_header
  • molecule_from_yaml

Description

  • molecule create deploys the droplet, but fails to write the config to filesystem with the error filter molecule_header missing. so molecule doesn't know about the droplet that's actually created.
  • molecule destroy This command does not destroy the droplet, as the config was not written to filesystem by create method in the first place. One has to manually cleanup/destroy the droplet on digitalocean.

Steps to reproduce

molecule init role -d digitalocean <rolename>
cd <rolename>

modify molecule.yaml eg:

---
dependency:
  name: galaxy
driver:
  name: digitalocean
platforms:
  - name: instance
    region: tor1
    size: s-1vcpu-2gb
    image: ubuntu-18-04-x64
provisioner:
  name: ansible
  log: yes
verifier:
  name: ansible
$ molecule create 

PLAY [Create]

TASK [Dump instance config] ************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "template error while templating string: no filter named 'molecule_header'. String: {{ instance_conf | to_json | from_json | molecule_to_yaml | molecule_header }}"}
$ molecule destroy

PLAY [Destroy] *************************************************************************************************************************************************************************************************

TASK [Populate instance config] ********************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "template error while templating string: no filter named 'molecule_from_yaml'. String: {{ lookup('file', molecule_instance_config) | molecule_from_yaml }}"}

Expected Behavior

  • molecule create should create the droplet and write the config.
  • molecule list should list the instances
  • molecule destroy should destroy the instances.

REASON

As of molecule v3, ansible molecule filters have been removed.

SOLUTION

  • Remove those 2 filters from the generated code works. But this approach would require modifying every molecule generated role manually.
  • A better approach would be to modify the cookiecutter template.

Driver is not loaded by molecule

pip install molecule-digitalocean

$ molecule init role -d digitalocean
Usage: molecule init role [OPTIONS] ROLE_NAME
Try 'molecule init role --help' for help.

Error: Invalid value for '--driver-name' / '-d': invalid choice: digitalocean. (choose from delegated, docker, ec2, podman)

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.