... | ... | @@ -108,3 +108,28 @@ By default, entities should provide only admin UI components. But, being built o |
|
|
5. Roles may receive a "feedback_url" variable, whence it can post data required by the front-end (e.g., backup path, git commit hash, etc.)
|
|
|
1. Role is responsible for a cURL (or whatever) call to post data to the provided URL.
|
|
|
6. Cleans up playbook.
|
|
|
|
|
|
### Ansible role examples
|
|
|
|
|
|
"Task" roles are small re-usable pieces of config.
|
|
|
|
|
|
```
|
|
|
aegir.generate-drupal7-site-backup/
|
|
|
├── meta/main.yml (equiv. to .info)
|
|
|
├── defaults/main.yml (variable defaults)
|
|
|
└── tasks/main.yml (steps to execute)
|
|
|
├── drush archive-dump
|
|
|
├── move to storage location (path)
|
|
|
└── post path back to front-end
|
|
|
```
|
|
|
|
|
|
```
|
|
|
aegir.write-nginx-vhost/
|
|
|
├── meta/main.yml
|
|
|
├── files/default-nginx-vhost.conf.j2
|
|
|
├── defaults/main.yml
|
|
|
└── tasks/main.yml
|
|
|
├── write vhost from template (possibly looking for overrides in various places)
|
|
|
└── restart nginx (but only if the vhost changed; i.e. idempotence)
|
|
|
```
|
|
|
|