Drone plugins > Ansible
ansible.svg

Ansible

by drone-plugins


The Ansible plugin can be used to run ansible plays.

Example

kind: pipeline
name: default

steps:
- name: check ansible syntax
  image: plugins/ansible:3
  settings:
    playbook: ansible/playbook.yml
    galaxy: ansible/requirements.yml
    inventory: ansible/inventory
    syntax_check: true

Properties

  • become

    booleanoptional

    run operations with become

    Default: false

  • become_method

    stringoptional

    privilege escalation method to use

    Default: none

  • become_user

    stringoptional

    run operations as this user

    Default: none

  • check

    booleanoptional

    run a check, do not apply any changes

    Default: false

  • connection

    stringoptional

    connection type to use

    Default: none

  • diff

    booleanoptional

    show the differences, may print secrets

    Default: false

  • extra_vars

    stringoptional

    set additional variables as key=value e.g. 'key1=value1,[key2=value2]'

    Default: none

  • flush_cache

    booleanoptional

    clear the fact cache for every host in inventory

    Default: false

  • force_handlers

    booleanoptional

    run handlers even if a task fails

    Default: false

  • forks

    numberoptional

    specify number of parallel processes to use

    Default: 5

  • galaxy

    stringoptional

    path to galaxy requirements

    Default: none

  • galaxy_force

    booleanoptional

    force overwriting an existing role or collection

    Default: true

  • inventory

    stringoptional

    specify (multiple) inventory host path(s) e.g. 'path1,[path2]'

    Default: none

  • limit

    stringoptional

    further limit selected hosts to an additional pattern

    Default: none

  • list_hosts

    booleanoptional

    outputs a list of matching hosts

    Default: false

  • list_tags

    booleanoptional

    list all available tags

    Default: false

  • list_tasks

    booleanoptional

    list all tasks that would be executed

    Default: false

  • module_path

    stringoptional

    prepend paths to module library e.g. 'path1,[path2]'

    Default: none

  • playbook

    stringoptional

    list of playbooks to apply e.g. 'playbook1,[playbook2]'

    Default: none

  • private_key

    stringoptional

    use this key to authenticate the ssh connection

    Secret recommended

    Default: none

  • requirements

    stringoptional

    path to python requirements

    Default: none

  • scp_extra_args

    stringoptional

    specify extra arguments to pass to scp only

    Default: none

  • sftp_extra_args

    stringoptional

    specify extra arguments to pass to sftp only

    Default: none

  • ssh_common_args

    stringoptional

    specify common arguments to pass to sftp/scp/ssh

    Default: none

  • ssh_extra_args

    stringoptional

    specify extra arguments to pass to ssh only

    Default: none

  • skip_tags

    arrayoptional

    only run plays and tasks whose tags do not match

    Default: none

  • start_at_task

    stringoptional

    start the playbook at the task matching this name

    Default: none

  • syntax_check

    booleanoptional

    perform a syntax check on the playbook

    Default: false

  • tags

    arrayoptional

    only run plays and tasks tagged with these values

    Default: none

  • timeout

    numberoptional

    override the connection timeout in seconds

    Default: 0

  • user

    stringoptional

    connect as this user

    Default: none

  • vault_id

    stringoptional

    the vault identity to use

    Default: none

  • vault_password

    stringoptional

    the vault password to use

    Secret recommended

    Default: none

  • verbose

    numberoptional

    level of verbosity, 0 up to 4

    Default: 0