You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
James Cammarata 9a401e73a6 Adding support for role dependencies.
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)
11 years ago
bin Misc style fixes. 11 years ago
docs/man Merge pull request #3094 from sfromm/issue2464-redux 12 years ago
docsite Document facts.d 11 years ago
examples Enable error_on_undefined_vars by default 11 years ago
hacking Fixup docs formatting. 11 years ago
lib/ansible Adding support for role dependencies. 11 years ago
library Cleaning up of apt_repository module and removing wget parts 11 years ago
packaging Proper support for RHEL/CentOS 5 (the only thing it needs now is to call python26) 11 years ago
plugins Merge pull request #3797 from mscherer/openshift_github 11 years ago
test Remove some test prints 11 years ago
.gitignore Update .gitignore 11 years ago
CHANGELOG.md Enable error_on_undefined_vars by default 11 years ago
CONTRIBUTING.md Fix some typos discovered during casual reading 11 years ago
COPYING license file should be in source tree 13 years ago
MANIFEST.in Add some docs/examples 12 years ago
Makefile Do not set RPMDIST to '%dist' when dist is not set by the distribution. 12 years ago
README.md Use new site URLs in README 11 years ago
RELEASES.txt Update releases 11 years ago
VERSION Version bump and assorted things to start new development version. 11 years ago
setup.py fix package mentioned twice in setup.py 12 years ago

README.md

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

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

AnsibleWorks