Commit graph

19619 commits

Author SHA1 Message Date
James Cammarata
d391c53b4f Clear blocked hosts when a role duplicate task is found in free strategy
In the free strategy, we mark a host as blocked when it has work to do
(the PlayIterator returns a task) to prevent multiple tasks from being sent
to the host. However, we check for role duplicates after setting the blocked
flag, but were not clearing that when the task was skipped leading to an
infinite loop. This patch corrects that by clearing the blocked flag when
the task is skipped.

Fixes #15681
2016-05-12 10:38:53 -04:00
James Cammarata
08f6283c3f Merge pull request #15747 from larsks/bug/15744
do not erroneously set gathered_facts=True
2016-05-12 10:22:45 -04:00
James Cammarata
64a738ce51 Merge branch 'zenbot-refresh-inventory-exit' into devel 2016-05-12 09:52:00 -04:00
James Cammarata
3439bcc744 Merge branch 'refresh-inventory-exit' of https://github.com/zenbot/ansible into zenbot-refresh-inventory-exit 2016-05-12 09:36:12 -04:00
James Cammarata
0d7530e6da Change error about loop variable in use to a warning 2016-05-11 21:50:12 -04:00
Toshio Kuratomi
8a184381af Strip junk after JSON return. (#15822)
Fixes #15601
2016-05-11 17:54:01 -07:00
James Cammarata
9d9a451b34 Simply being in an always block shouldn't mean a host did not fail
Previously the changed code was necessary, however it is now problematic
as we've started using the is_failed() method in other places in the code.
Additional changes at the strategy layer should make this safe to remove
now.

Fixes #15625
2016-05-11 19:13:12 -04:00
Carl
fefd87c61a Fixes #15745 playbook include: Conditional scoping
Fixes #15745
Applies conditional forwarding to all tasks/roles within the included playbook.
The existing line only applies forwarded conditionals to the main Task block, and misses pre_, post_, and roles.

Typo ::

Made a selection mistake when I copied over the one line change
2016-05-11 15:58:36 -04:00
James Cammarata
37737ca6c1 Merge pull request #15466 from alikins/pr_10555_cobbler_auth_rebase
add cobbler api authentication options
2016-05-11 15:17:37 -04:00
Toshio Kuratomi
18587842c6 Exclude the sample directory from tests 2016-05-11 12:03:23 -07:00
James Cammarata
33de7707c9 Do not include params when getting role vars in certain situations
In VariableManager, we fetch the params specifically in the next step,
so including them in the prior step is unnecessary and could lead to things
being overridden in an improper order.

In Block, we should not be getting the params for the role as they are
included earlier via the VariableManager.

Fixes #14411
2016-05-11 13:17:32 -04:00
James Cammarata
161388226b Merge branch 'dagwieers-samples-to-test' into devel 2016-05-11 09:57:46 -04:00
James Cammarata
67c32ac30a Merge branch 'samples-to-test' of https://github.com/dagwieers/ansible into dagwieers-samples-to-test 2016-05-11 09:57:21 -04:00
Toshio Kuratomi
9096901c1f Update submodule refs 2016-05-10 21:59:42 -07:00
Toshio Kuratomi
99e3880181 small python3 fix so that ping will run on python3 2016-05-10 21:59:42 -07:00
Matt Martz
accf40d8a8 Use httptester docker image for http tests (#15811)
* Use httptester docker image for http tests

* When not running with an httptester linked container, use public test sites
2016-05-10 23:43:07 -04:00
Brian Coca
4561be00af simplified inventory error messaging 2016-05-10 17:16:26 -04:00
Devon Harvey
e33b97ed1f Fix typo in intro_dynamic_inventory.rst (#15810) 2016-05-10 16:19:52 -04:00
Tim Rupp
a685fa5543 Add port argument for bigsuds (#15434)
This patch adds the port argument as a valid parameter to the f5_spec.

This argument is supported in bigsuds version 1.0.4 and greater, so
this patch uses the __version__ variable of the bigsuds module to
determine when the port value should be honored by the module.
2016-05-10 16:07:01 -04:00
Brian Coca
f576082949 restore old jsonfile behaviour on key expiration
fixes #14456, now it won't expire keys in middle of a play when they
were 'valid' at 'gather time'.
2016-05-10 15:55:33 -04:00
Toshio Kuratomi
dae1d4dbb7 Add changelog entry for ec2_customer_gateway (in 2.2) 2016-05-10 09:34:10 -07:00
Brian Coca
47d05e9b58 fix bad assignment, method modifies by ref already
fixes #15694
2016-05-10 12:08:03 -04:00
Toshio Kuratomi
c730af5dc2 Remove reload from arg related tests. Changes to how ziploader passes args mean we don't need reload anymore. (#15782) 2016-05-10 08:13:48 -07:00
Sandra Wills
5da63e18a6 updating and cleaning up the appearance of the copyright date and footer content 2016-05-10 10:30:05 -04:00
Matthew Stoltenberg
ddd9f92255 add repr for hostvars (#15793)
* allows passing full hostvars to a module
2016-05-10 10:23:10 -04:00
Sandra Wills
0dc6177217 updated video link in quickstart with link from danlondon/ansible marketing 2016-05-10 10:16:22 -04:00
Toshio Kuratomi
9e88fa21f5 Update submodule refs 2016-05-10 07:13:57 -07:00
Toshio Kuratomi
7ccb08cc7e Switch to a different url for testing SNI right now. (#15798) 2016-05-10 07:08:47 -07:00
Victor Bocharsky
395f85e1bf Highlight SSH protocol types 2016-05-10 10:48:59 +03:00
Robin Roth
254cf9ea68 reduce async timeout
reduce from 3 sec to 0.1 sec; the 3 sec sleep was about half of the total unittest time on my development machine...
2016-05-10 08:09:28 +02:00
Darren Birkett
30decd5e0a Fix a couple of typos in guide_rax.rst (#15795) 2016-05-09 18:27:18 -04:00
Kamjar Gerami
724e692f54 fixes-#15685-tools-that-paginate-show-spurious-less-output: less --version outputs to standard out not to standard error so this changes the redirect from 2> to > (#15720)
fixes-#15685-tools-that-paginate-show-spurious-less-output: Updated redirect to include stderr as well as stdout to not show any errors on screen
2016-05-09 16:48:46 -04:00
jctanner
781de83762 When walking through module directories, always follow symlinks. (#15784)
Fixes #15783
2016-05-09 14:24:39 -04:00
Mike Bryant
68795d8128 Allow ssh agent usage for junos_netconf
By default the `Shell` class disables ssh agents. The `junos_netconf`
module uses this class, but doesn't re-enable agents.
Here it's explicitly enabled again, so an ssh agent can be used to
connect to and configure Junos devices.
2016-05-09 17:54:53 +01:00
Toshio Kuratomi
409bfe4d0f Strip leading and trailing whitespace for json arg types 2016-05-09 08:14:50 -07:00
Jose Andres Alvarez Loaiciga
6309ca4883 Fix typo in ansible-playbook 2016-05-09 09:05:43 -06:00
Robin Roth
30e5999812 Fix distribution_facts missing on BSD (#15780)
The previous fix in #15773 only solved MacOSX, but left other BSDs broken

fixes #15768
2016-05-09 10:55:28 -04:00
Scott Radvan
72ca3b2b5b add very minor punctuation fixes (#15763) 2016-05-09 10:12:24 -04:00
Pomin Wu
78808fc4cc Fixed ansible_os_family variable on OS X (#15768) (#15773)
Fixed `ansible_os_family` variable on OS X
2016-05-09 09:59:26 -04:00
Abhijit Menon-Sen
848b015ce6 Merge pull request #15764 from sradvan/2.0.2-should-be-2016
wrong year in releases file
2016-05-07 18:59:03 +05:30
Scott Radvan
48ef69982b s/2015/2016 2016-05-08 00:16:47 +12:00
Scott Butler
ff2d3fee3e Tech review edits. 2016-05-06 12:59:07 -07:00
Scott Butler
b2d3631ca1 Initial structural development draft of working with networking topic 2016-05-06 10:35:46 -07:00
nitzmahone
fca5ba153e bump extras submodule ref 2016-05-06 09:49:33 -07:00
Toshio Kuratomi
0a5831e654 Update submodule refs 2016-05-06 08:13:51 -07:00
Miguel Cabrerizo
a274ef9adc Update intro_dynamic_inventory.rst (#15750)
When using Cobbler with Ansible a cobbler.ini file is needed by the /etc/ansible/cobbler.py script, otherwise Python errors like ConfigParser.NoSectionError: No section: 'cobbler' are shown. Maybe this could be added to the documentation. Thanks and cheers!
2016-05-06 09:57:16 -04:00
Jiri Tyr
589f6d25bb Updating VCA module documentation (#14368) 2016-05-06 09:53:43 -04:00
James Cammarata
09c90f7f2f Fixing bugs in strategies
* Don't filter hosts remaining based on their failed state. Instead rely
  on the PlayIterator to return None/ITERATING_COMPLETE when the host is
  failed.
* In the free strategy, make sure we wait outside the host loop for all
  pending results to be processed.
* Use the internal _set_failed_state() instead of manually setting things
  when a failed child state is hit

Fixes #15623
2016-05-06 09:22:11 -04:00
Lars Kellogg-Stedman
21ac95402f do not erroneously set gathered_facts=True
In `lib/ansible/executor/play_iterator.py`, ansible sets a host's
`_gathered_facts` property to `True` without checking to see if there
are any tasks to be executed.  In the event that the entire play is
skipped, `_gathered_facts` will be `True` even though the `setup`
module was never run.

This patch modifies the logic to only set `_gathered_facts` to `True`
when there are tasks to execute.

Closes #15744.
2016-05-05 23:45:06 -04:00
Toshio Kuratomi
5c7ad654db Add some more tests for item squashing 2016-05-05 20:33:44 -07:00