https://github.com/drone-plugins/drone-ansible
Drone plugin to provision via Ansible
https://github.com/drone-plugins/drone-ansible
drone drone-plugin
Last synced: 4 months ago
JSON representation
Drone plugin to provision via Ansible
- Host: GitHub
- URL: https://github.com/drone-plugins/drone-ansible
- Owner: drone-plugins
- License: apache-2.0
- Created: 2018-07-18T14:58:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T14:38:11.000Z (about 1 year ago)
- Last Synced: 2025-04-11T15:29:51.644Z (about 1 year ago)
- Topics: drone, drone-plugin
- Language: Go
- Homepage: http://plugins.drone.io/drone-plugins/drone-ansible
- Size: 111 KB
- Stars: 31
- Watchers: 7
- Forks: 46
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drone-ansible
[](http://cloud.drone.io/drone-plugins/drone-ansible)
[](https://gitter.im/drone/drone)
[](https://discourse.drone.io)
[](https://stackoverflow.com/questions/tagged/drone.io)
[](https://microbadger.com/images/plugins/ansible "Get your own image badge on microbadger.com")
[](http://godoc.org/github.com/drone-plugins/drone-ansible)
[](https://goreportcard.com/report/github.com/drone-plugins/drone-ansible)
Drone plugin to provision infrastructure with [Ansible](https://www.ansible.com/). For the usage information and a listing of the available options please take a look at [the docs](http://plugins.drone.io/drone-plugins/drone-ansible/).
## Build
Build the binary with the following command:
```console
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:
```console
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
```console
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
```