This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
dokku-ansible-playbook/README.md

51 lines
1.0 KiB
Markdown
Raw Normal View History

2020-03-19 00:13:54 +00:00
# dokku-ansible-playbook
Run ansible playbooks during deployment.
## Requirements
* dokku 0.19.13+
2020-03-19 01:19:51 +00:00
* [dokku-supply-config](https://github.com/dokku-community/dokku-supply-config)
* Debian based system (uses `apt` package manager for dependencies)
2020-03-19 00:13:54 +00:00
## Installation
```shell
2020-03-19 01:19:51 +00:00
$ dokku plugin:install https://github.com/josegonzalez/dokku-supply-config.git
2020-03-19 00:13:54 +00:00
$ dokku plugin:install https://github.com/decentral1se/dokku-ansible-playbook.git
```
## Usage
2020-03-19 01:19:51 +00:00
All files must be placed within the `.dokku/ansible` folder of your git repository.
2020-03-19 00:13:54 +00:00
2020-03-19 00:43:41 +00:00
* `requirements.yml`: what role dependencies to download before running your plays.
2020-03-19 00:55:49 +00:00
2020-03-19 01:19:51 +00:00
The following hooks are supported (add `.yml` to the hook name in `.dokku/ansible`):
2020-03-19 00:55:49 +00:00
* `pre-deploy`
* `post-deploy`
## Example
2020-03-19 01:19:51 +00:00
### .dokku/ansible/requirements.yml
2020-03-19 00:55:49 +00:00
```yaml
---
- src: dokku_bot.ansible_dokku
version: v2020.3.15
```
2020-03-19 01:19:51 +00:00
### .dokku/ansible/pre-deploy.yml
2020-03-19 00:55:49 +00:00
```yaml
---
- hosts: all
tasks:
- name: Create foobar group
group:
name: foobar
system: true
state: present
```