mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
9a401e73a6
Fixes #3686 Dependencies are enabled by adding a new directory/file named meta/main.yml to the role. The format of the dependencies are: dependencies: - { role: foo, x: 1, y: 2 } - { role: bar, x: 3, y: 4 } ... Dependencies inherit variables as they are seen at the time of the dependency inclusion. For example, if foo(x=1, y=2) has a dependency on bar(x=3,z=4), then bar will have variables (x=3,y=2,z=4). Different roles can have dependencies on the same role, and this variable inheritence allows for the reuse of generic roles quite easily. For example: Role 'car' has the following dependencies: dependencies: - { role: wheel, n: 1 } - { role: wheel, n: 2 } - { role: wheel, n: 3 } - { role: wheel, n: 4 } Role 'wheel' has the following dependencies: dependencies: - { role: tire } - { role: brake } The role 'car' is then used as follows: - { role: car, type: honda } And tasks/main.yml in each role simply contains the following: - name: {{ type }} whatever {{ n }} command: echo '' TASK: [honda tire 1] TASK: [honda brake 1] TASK: [honda wheel 1] TASK: [honda tire 2] TASK: [honda brake 2] TASK: [honda wheel 2] TASK: [honda tire 3] TASK: [honda brake 3] TASK: [honda wheel 3] TASK: [honda tire 4] TASK: [honda brake 4] TASK: [honda wheel 4] TASK: [I'm a honda] <- (this is in roles/car/tasks/main.yml) |
||
---|---|---|
bin | ||
docs/man | ||
docsite | ||
examples | ||
hacking | ||
lib/ansible | ||
library | ||
packaging | ||
plugins | ||
test | ||
.gitignore | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
COPYING | ||
Makefile | ||
MANIFEST.in | ||
README.md | ||
RELEASES.txt | ||
setup.py | ||
VERSION |
Ansible
Ansible is a radically simple configuration-management, deployment, task-execution, and multinode orchestration framework.
Read the documentation and more at http://ansibleworks.com/
Many users run straight from the development branch (it's generally fine to do so), but you might also wish to consume a release. You can find instructions on http://ansibleworks.com/docs/gettingstarted.html for a variety of platforms. If you want a tarball of the last release, go to http://ansibleworks.com/releases/ and you can also install with pip (though that will bring in some optional binary dependencies you normally do not need).
Design Principles
- Dead simple setup
- Super fast & parallel by default
- No server or client daemons; use existing SSHd
- No additional software required on client boxes
- Modules can be written in ANY language
- Awesome API for creating very powerful distributed scripts
- Be usable as non-root
- The easiest config management system to use, ever.
Get Involved
- ansible-project mailing list, rss: here
- irc.freenode.net: #ansible
Branch Info
- Releases are named after Van Halen songs.
- The devel branch corresponds to the release actively under development.
- Various release-X.Y branches exist for previous releases
- We'd love to have your contributions, read "CONTRIBUTING.md" for process notes.
Author
Michael DeHaan -- michael@ansibleworks.com