You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Thomas Boerger e03af11636
Merge pull request #44 from hrenard/no-galaxy-force
2 years ago
.github Properly configure permissions for protected branches 4 years ago
docker update ansible to v2.10.0 2 years ago
.dockerignore Typo 4 years ago
.drone.starlark Drop windows builds, ansible is not supported on windows 3 years ago
.drone.yml Drop windows builds, ansible is not supported on windows 3 years ago
.gitignore Make gitignore more simple 3 years ago
LICENSE Initial commit 4 years ago
README.md Unified documentation and readme 4 years ago
go.mod feat(go): switch dep to go module 4 years ago
go.sum feat(go): switch dep to go module 4 years ago
main.go remove negation 2 years ago
plugin.go remove unnecessary condition 2 years ago

README.md

drone-ansible

Build Status Gitter chat Join the discussion at https://discourse.drone.io Drone questions at https://stackoverflow.com Go Doc Go Report

Drone plugin to provision infrastructure with Ansible. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

go build -v -a -tags netgo -o release/linux/amd64/drone-ansible

Docker

Build the Docker image with the following command:

docker build \
  --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
  --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
  --file docker/Dockerfile.linux.amd64 --tag plugins/ansible .

Usage

docker run --rm \
  -e PLUGIN_PRIVATE_KEY="$(cat ~/.ssh/id_rsa)" \
  -e PLUGIN_PLAYBOOK="deployment/playbook.yml" \
  -e PLUGIN_INVENTORY="deployment/hosts.yml" \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  plugins/ansible