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
booleanoptionalrun operations with become
Default: false
become_method
stringoptionalprivilege escalation method to use
Default: none
become_user
stringoptionalrun operations as this user
Default: none
check
booleanoptionalrun a check, do not apply any changes
Default: false
connection
stringoptionalconnection type to use
Default: none
diff
booleanoptionalshow the differences, may print secrets
Default: false
extra_vars
stringoptionalset additional variables as key=value e.g. 'key1=value1,[key2=value2]'
Default: none
flush_cache
booleanoptionalclear the fact cache for every host in inventory
Default: false
force_handlers
booleanoptionalrun handlers even if a task fails
Default: false
forks
numberoptionalspecify number of parallel processes to use
Default: 5
galaxy
stringoptionalpath to galaxy requirements
Default: none
galaxy_force
booleanoptionalforce overwriting an existing role or collection
Default: true
inventory
stringoptionalspecify (multiple) inventory host path(s) e.g. 'path1,[path2]'
Default: none
limit
stringoptionalfurther limit selected hosts to an additional pattern
Default: none
list_hosts
booleanoptionaloutputs a list of matching hosts
Default: false
list_tags
booleanoptionallist all available tags
Default: false
list_tasks
booleanoptionallist all tasks that would be executed
Default: false
module_path
stringoptionalprepend paths to module library e.g. 'path1,[path2]'
Default: none
playbook
stringoptionallist of playbooks to apply e.g. 'playbook1,[playbook2]'
Default: none
private_key
stringoptionaluse this key to authenticate the ssh connection
Secret recommendedDefault: none
requirements
stringoptionalpath to python requirements
Default: none
scp_extra_args
stringoptionalspecify extra arguments to pass to scp only
Default: none
sftp_extra_args
stringoptionalspecify extra arguments to pass to sftp only
Default: none
ssh_common_args
stringoptionalspecify common arguments to pass to sftp/scp/ssh
Default: none
ssh_extra_args
stringoptionalspecify extra arguments to pass to ssh only
Default: none
skip_tags
arrayoptionalonly run plays and tasks whose tags do not match
Default: none
start_at_task
stringoptionalstart the playbook at the task matching this name
Default: none
syntax_check
booleanoptionalperform a syntax check on the playbook
Default: false
tags
arrayoptionalonly run plays and tasks tagged with these values
Default: none
timeout
numberoptionaloverride the connection timeout in seconds
Default: 0
user
stringoptionalconnect as this user
Default: none
vault_id
stringoptionalthe vault identity to use
Default: none
vault_password
stringoptionalthe vault password to use
Secret recommendedDefault: none
verbose
numberoptionallevel of verbosity, 0 up to 4
Default: 0