Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
pycklets / resources / frecklet / ansible-role.frecklet
Size: Mime:
doc:
  short_help: Execute an arbitrary role from Ansible Galaxy.
  help: |
    This is a generic task to execute any of the Ansible roles that are hosted on [Ansible galaxy](https://galaxy.ansible.com).

    Currently only a few basic metadata keys are supported: ``include_type``, ``become`` &``become_user``. The other ones will be added
    when necessary.

    Be aware, if the role is not in the default or community resources repository, this will only work if 'allow_remote' or 'allow_remote_roles' is set to true in the context that is used.
  examples:
  - title: Run the [geerlingguy.docker](https://github.com/geerlingguy/ansible-role-docker) role.
    desc: |
      Runs the [geerlingguy.docker](https://github.com/geerlingguy/ansible-role-docker) role, setting a few variables which are documented in that [roles README.md](https://github.com/geerlingguy/ansible-role-docker/blob/master/README.md).

      Note, any users specified in the 'docker_users' var won't be created automatically, as would be the case with the '[docker-service](frecklet::docker-service)' frecklet (which, by the way, uses that same role under the hood).
    vars:
      name: geerlingguy.docker
      role_vars:
        docker_edition: ce
        docker_install_compose: false
        docker_users:
        - admin
        - freckles

args:
  name:
    doc:
      short_help: The role name.
    type: string
    required: true
    cli:
      param_type: argument
  become:
    doc:
      short_help: Whether to become another user.
    type: boolean
    required: false
  become_user:
    doc:
      short_help: The user to become.
    type: string
    empty: false
    required: false
  role_vars:
    doc:
      short_help: The parameters for the role.
    type: dict
    required: false
    empty: true
    default: {}
  include_type:
    doc:
      short_helop: Whether to 'include' or 'import' the role.
    type: string
    allowed:
    - include
    - import
    default: include

frecklets:
- frecklet:
    name: ansible-role
    type: ansible-meta
    properties:
      elevated: '{{:: become ::}}'
  task:
    become: '{{:: become ::}}'
    become_user: '{{:: become_user ::}}'
    include-type: '{{:: include_type ::}}'
  vars:
    name: '{{:: name ::}}'
    become: '{{:: become ::}}'
    become_user: '{{:: become_user ::}}'
    vars: '{{:: role_vars ::}}'
meta: {}