Woodpecker CI Plugins
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

wp-ansible

Build Status Docker Hub Quay.io Go Report Card GitHub contributors Source: GitHub License: Apache-2.0

Woodpecker CI plugin to manage infrastructure with Ansible.

Usage

steps:
  - name: ansible
    image: quay.io/thegeeklab/wp-ansible
    settings:
      playbook: deployment/playbook.yml
      private_key:
        from_secret: ansible_private_key
      inventory: deployment/hosts.yml

Parameters

become optional bool
Enable privilege escalation.
Default: false
become_method optional string
Privilege escalation method to use.
Default: none
become_user optional string
Privilege escalation user to use.
Default: none
check optional bool
Run a check, do not apply any changes.
Default: false
connection optional string
Connection type to use.
Default: none
diff optional bool
Show the differences. Be careful when using it in public CI environments as it can print secrets.
Default: false
extra_vars optional list
Set additional variables as key=value.
Default: none
flush_cache optional bool
Clear the fact cache for every host in inventory.
Default: false
force_handlers optional bool
Run handlers even if a task fails.
Default: false
forks optional integer
Specify number of parallel processes to use.
Default: 5
galaxy_requirements optional string
Path to galaxy requirements file.
Default: none
inventory optional list
Path to inventory file.
Default: none
limit optional string
Limit selected hosts to an additional pattern.
Default: none
list_hosts optional bool
Outputs a list of matching hosts.
Default: false
list_tags optional bool
List all available tags.
Default: false
list_tasks optional bool
List all tasks that would be executed.
Default: false
module_path optional list
Prepend paths to module library.
Default: none
playbook optional list
List of playbooks to apply.
Default: none
private_key optional string
SSH private key used to authenticate the connection.
Default: none
python_requirements optional string
Path to python requirements file.
Default: none
scp_extra_args optional string
Specify extra arguments to pass to SCP connections only.
Default: none
sftp_extra_args optional string
Specify extra arguments to pass to SFTP connections only.
Default: none
skip_tags optional string
Only run plays and tasks whose tags do not match.
Default: none
ssh_common_args optional string
Specify common arguments to pass to SFTP, SCP and SSH connections.
Default: none
ssh_extra_args optional string
Specify extra arguments to pass to SSH connections only.
Default: none
start_at_task optional string
Start the playbook at the task matching this name.
Default: none
syntax_check optional bool
Perform a syntax check on the playbook.
Default: false
tags optional string
Only run plays and tasks tagged with these values.
Default: none
timeout optional integer
Override the connection timeout in seconds.
Default: 0
user optional string
Connect as this user.
Default: none
vault_id optional string
The vault identity to use.
Default: none
vault_password optional string
The vault password to use.
Default: none
verbose optional integer
Level of verbosity, 0 up to 4.
Default: 0

Build

Build the binary with the following command:

make build

Build the Container image with the following command:

docker build --file Containerfile.multiarch --tag thegeeklab/wp-ansible .

Test

docker run --rm \
  -e PLUGIN_PLAYBOOK=deployment/playbook.yml \
  -e PLUGIN_SYNTAX_CHECK=true \
  -v $(pwd):/build:z \
  -w /build \
  thegeeklab/wp-ansible