Ubuntu – How to create a juju-unit for ansible

juju

I need to build a juju unit for ansible alone. I can't find ansible charm in charm store. What would be the better approach?

Best Answer

  • There already exists an Ansible layer. If you start creating your charm (Info found here) you can add this layer to you layer.yaml file. Here is an example of how your layer.yaml would look like:

    includes: ['layer:basic', 'layer:ansible-base']
    repo: git@github.com:sebastienpattyn93/ansible-charm.git
    

    This will make sure that your charm will install Ansible. If you want your charm to things on top of ansible make sure to use the flag @when('ansible.available')

    The github page of the ansible-base shows more information on how to use ansible playbooks with this charm.