Commit graph

6507 commits

Author SHA1 Message Date
Michael DeHaan
42648e2f0a Merge branch 'role_dependencies' of git://github.com/jimi1283/ansible into jimi1283-role_dependencies 2013-08-16 21:42:57 -04:00
Michael DeHaan
0eb1827936 Some install guide tweaks. 2013-08-16 17:02:35 -04:00
Michael DeHaan
f2ec0d5ff2 Update changelog 2013-08-16 15:24:33 -04:00
Michael DeHaan
dacd311474 Removing synchronize momentarily as it looks like this won't make 1.3 dates 2013-08-16 15:22:39 -04:00
James Cammarata
5429586985 Adding documentation on role dependencies and variable scope/inheritance 2013-08-16 10:34:45 -05:00
Michael DeHaan
33810c60cd Merge pull request #3867 from bcoca/pingdom_nicer_import_error
now missing dep gives nicer error and docs disambiguate lib
2013-08-16 04:45:48 -07:00
James Cammarata
d8a7a2d1b2 Adding evaluation of role vars as the dep tree is built
This allows variables to be inserted into the role scope specifically
while also being inserted into the global scope.
2013-08-15 20:53:23 -05:00
Brian Coca
52dd1dd4c5 now missing dep gives nicer error and docs disambiguate as several libs
out there have same name.
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-08-15 21:26:35 -04:00
Darragh O'Reilly
fb42efc355 quantum_network should not default network provider type to local
It should allow the Quantum service to decide based on its configuration.
2013-08-15 19:51:22 +01:00
James Cammarata
e12b99dba6 Small cleanup, no need to call _get_role_path a second time 2013-08-15 09:29:51 -05:00
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)
2013-08-15 09:29:51 -05:00
James Cammarata
ad595eadea Enable error_on_undefined_vars by default 2013-08-15 09:28:34 -05:00
Jesse Keating
2b96c347dc Exit with status 3 if no failures but unreachable.
Provide hints to playbook callers that a playbook execution had
unreachable vs failures. 2 == failures, 3 == no failures, but
unreachable hosts. 0 continues to be all good.
2013-08-14 13:37:26 -07:00
Luca Berruti
eee278e02b fix 2013-08-14 13:26:14 +02:00
Luca Berruti
5048218ab5 Fix: with_items and complex_args 2013-08-14 11:49:46 +02:00
Matt Hite
e2278fd9e8 Automatically prepend partition if non-fully qualified monitors are passed 2013-08-13 22:00:49 -07:00
Matt Hite
b26a88095f Documentation fixes and enhancements 2013-08-13 20:59:49 -07:00
James Cammarata
10a0f03cdc Cleaning up of apt_repository module and removing wget parts 2013-08-13 16:11:03 -05:00
Michael Vogt
de404eac06 use either pycurl or wget to download from launchpad, also improve error message if neither is installed 2013-08-13 14:39:47 -05:00
Michael Vogt
5e56d42ed1 use pycurl instead of urllib2 when talking to launchpad to actually get SSL cert verification, see https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/915210 or CVE-2011-4407 for a previous similar issue in software-properties 2013-08-13 14:39:47 -05:00
James Cammarata
c4852f6954 Cleaning up some pep8 whitespace issues in mongodb_user 2013-08-13 13:00:37 -05:00
lwade
eaac295fb2 Basic module to tag resources in EC2. 2013-08-13 12:55:06 -05:00
James Cammarata
0958673574 Reverting version_added field in the apt_repository module 2013-08-13 09:53:49 -05:00
Alexander Saltanov
ded947008a Replacement for apt_repository.
1. Debian Squeeze is supported out of box now.
2. Repository type "deb" or "deb-src" should be explicitly specified.
3. If a source had beed added it must be possible to remove it.
4. PPA can be only used against Ubuntu hosts.
2013-08-13 09:53:49 -05:00
asmajlovic
8f45b77d30 Comparison data type mismatch corrected 2013-08-13 09:28:53 -05:00
James Cammarata
0c98c764e3 Fixing up a small issue with the mongodb_user docs 2013-08-13 09:05:19 -05:00
Ben Podoll
94e60563b4 adding fixes to support older versions of mongo (and pymongo) as well as new versions 2013-08-13 00:23:58 -05:00
Ben Podoll
bcef62cd39 adding comment about required version of mongodb to use the roles param 2013-08-12 21:25:21 -05:00
Serge van Ginderachter
173586b871 Ensure plugin_loader.all() only loads one instance
by ensuring all basedirs, plugin paths and extra
paths are handled as absolute paths and are checked
to not add any doubles.

This fixes the corner case where e.g. the user has
an additional plugin path configured to a dir
relative to his playbooks or inventory location,
which also matches the  _plugin subdir relative to
one of the basedirs in the play.

For most plugins this doesn't show as an obvious issue
except for callback_plugins, which might fire more
than once. Other plugins (inventory and template
plugins) might unnecessarily be ran twice.

e.g. ansible.cfg has
callback_plugins   = ./plays/callback_plugins
and plays/ contains a playbook file:
.
├── ansible.cfg
├── inventory
└── plays
    ├── callback_plugins
    │   └── timestamp.py
    └── site.yml

modified:   lib/ansible/utils/plugins.py
2013-08-12 22:17:53 +02:00
Ben Podoll
d330228d11 adding the ability to specify roles when adding/modifying a mongo user 2013-08-12 15:03:31 -05:00
Ben Podoll
3e32654f9d fixing problem causing docs not to build 2013-08-12 12:17:34 -05:00
Ben Podoll
13bef3579f adding a little more info to the 'path' param so it's clear there are aliases (which are used in other examples) to avoid confusion 2013-08-12 11:45:32 -05:00
James Cammarata
6feb4e3837 Fail apt package install when nothing is matched by the fnmatch pattern
Related to PR #3823
2013-08-12 11:26:31 -05:00
Michael Vogt
5c39c659e5 add support for fnmatch() style apt filenames
You can write a apt action like "- apt: pkg=apt*" with this package.
2013-08-12 16:11:15 +02:00
Michael DeHaan
11fe4566f8 Document facts.d 2013-08-12 09:49:54 -04:00
Mark Mandel
6e3ec9ccc0 expand user home path in stat. 2013-08-12 17:34:54 +10:00
Michael DeHaan
9b09ff4a65 Merge pull request #3821 from danxshap/django_venv_expand_user
Use home path expansion for virtualenv param in django_manage module
2013-08-11 17:53:01 -07:00
danxshap
4db4607ee5 use home path expansion for virtualenv param in django_manage module 2013-08-11 14:02:13 -07:00
Michael DeHaan
4e5feb6322 Merge pull request #3763 from j2sol/rax-updates
Update rax to sync with rax_clb_nodes
2013-08-11 13:37:25 -07:00
Michael DeHaan
eb54c222de update changelog 2013-08-11 16:26:12 -04:00
Michael DeHaan
06cb24940d Merge pull request #3797 from mscherer/openshift_github
Add openshift inventory plugin
2013-08-11 13:25:07 -07:00
Michael DeHaan
bc02e20503 Merge branch 'rsynctake2' into devel
Conflicts:
	CHANGELOG.md
2013-08-11 16:22:36 -04:00
Michael DeHaan
cde87f2f55 Add missing version_added to docs. 2013-08-11 16:21:00 -04:00
Michael DeHaan
70c42eeb64 Merge pull request #3784 from drewblas/devel
Added git disclaimer about dealing with ssh host checking
2013-08-11 12:50:48 -07:00
Michael DeHaan
6af77226fa Merge pull request #3818 from resmo/feature/docsite-update
update docsite about new variable inventory_file
2013-08-11 12:50:20 -07:00
Michael DeHaan
17aa0d12de Merge pull request #3814 from ftao/inventory_dir_abs
fix inventory.basedir is not absolute path when hostfile is startswith "./"
2013-08-11 08:46:08 -07:00
Michael DeHaan
1336bbd2f2 Merge pull request #3815 from amenonsen/typos
Fix some typos discovered during casual reading
2013-08-11 08:45:00 -07:00
Michael DeHaan
5a063fd55a Merge pull request #3816 from DanLovesProofs/fix-docs
Brings postgresql_db examples in line with documentation.
2013-08-11 08:43:23 -07:00
Abhijit Menon-Sen
1a90d01ba9 Fix some typos discovered during casual reading 2013-08-11 18:41:23 +05:30
René Moser
28267de3fe update docsite about new variable inventory_file 2013-08-11 11:08:57 +02:00