Commit Graph

19340 Commits (6f0bc4dd828d7baa1a164916f82bea80df5c2bfd)
 

Author SHA1 Message Date
Toshio Kuratomi 36f2312071 Update core submodule to pull in docker documentation fix 9 years ago
Matt Clay b970e2ca80 Add work-around for ssh pty race condition.
This should minimize loss of stdout when using
a pty and connecting with ssh or paramiko_ssh.

(cherry picked from commit bad293ae35)
9 years ago
James Cammarata 036547b4dd New release v2.1.0.0-0.3.rc3 9 years ago
chouseknecht eae26891ea Fix typo.
(cherry picked from commit 0bc23a4408)
9 years ago
chouseknecht b5ccbf2986 Update ansible-container links.
(cherry picked from commit 22de8a9a21)
9 years ago
chouseknecht 7bfc3df933 Fix italics and version directives.
(cherry picked from commit 0c80b71d71)
9 years ago
chouseknecht 1aa39ae78b Add docker_service and mention ansible-container.
(cherry picked from commit 10c5d9e749)
9 years ago
James Cammarata a6150dbc14 More playbook executor compatibility fixes
With some earlier changes, continuing to forward failed hosts on
to the iterator with each TQM run() call was causing plays with
max_fail_pct set to fail, as hosts which failed in previous plays
were counting those old failures against the % calculation.

Also changed the linear strategy's calculation to use the internal
failed list, rather than the iterator, as this now represents the
hosts failed during the current run only.
9 years ago
Toshio Kuratomi 92e4f25066 Make load_params into a function that custom modules can access (#15913) 9 years ago
Dag Wieers b3676392a8 Fix small typo in ansible.cfg (#15912) 9 years ago
machilde 41f45336a9 Fixed issue with parents havings depth of 3+ on add method of NetworkConfig 9 years ago
James Cammarata 710a96956e In TQM run() mark any entries in _failed_hosts as failed in the PlayIterator
As noted in the comment, the TQM may be used for more than one play. As such,
after creating the new PlayIterator object it is necessary to mark any failed
hosts from previous calls to run() as failed in the iterator, so they are
properly skipped during any future calls to run().
9 years ago
James Cammarata 7855612805 Re-remove checking for failed state on hosts when building list of hosts
This was re-added by 63471cd (and modified by me to use iterator again),
it simply needs to be removed.

Fixes #15395
9 years ago
Vincent Roy b0259a8631 Make sure that serial failures are handled correctly. 9 years ago
Vincent Roy 5e9b13cb94 Don't let max_fail_percentage affect future plays. 9 years ago
Vincent Roy 46e9e4c4da Handle max_fail_percentage per task. 9 years ago
Vincent Roy 9602e43952 Don't stop executing plays after failure.
https://github.com/ansible/ansible/pull/13750/files
9 years ago
Vincent Roy c901c9144c Backward compatibility execution failures with 1.9 9 years ago
Mike Bryant 76cd7cadfe 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.
9 years ago
Kei Nohguchi 94e4e4105d openswitch.py: Fix the OpenSwitch REST authentication
It's a cookie based authentication, that we get it
through /login endpoint, called by connect() method
and save the cookie for the rest of the call.
9 years ago
Peter Sprygada 309aba128c handle name resolution errors more gracefully from shell.py
This change will catch socket.gaierror exceptions from shell.py and
return a more friendly message to the user
9 years ago
nitzmahone ff346a199c fix windows integration tests to run under kerberos users 9 years ago
Peter Sprygada 2259b90827 bugfix for issue with trying to eval contains with non-string
fixes ansible/ansible-modules-core#3502
9 years ago
Brian Coca cd2991c02d made format more flexible and allow for non dict entries 9 years ago
Peter Sprygada d9fa5a3b80 fixes #15496
changed to using OrderedDict to preserve order of lines
9 years ago
Michael Scherer e0112a3db3 Fix pkgin detection on NetBSD 6 and 7 (#15834)
Since this is now the default package manager, it got moved
to another location on Netbsd :

  netbsd# type pkgin
  pkgin is a tracked alias for /usr/pkg/bin/pkgin
  netbsd# uname -a
  NetBSD netbsd.example.org 6.1.4 NetBSD 6.1.4 (GENERIC) amd64

But since the package manager is also used outside of NetBSD, we
have to keep the /opt/local path too.
9 years ago
Nathaniel Case 8f4243c3ec Check for jxmlease when using netconf on JUNOS. (#15835) 9 years ago
Kei Nohguchi 956829f0f0 net_template.py: Fix jinja2 template file search path (#15134)
The change is needed to support the multiple include statements
inside the jinja2 template file, as in '{% include ['another.j2'] %}'.
statement.  I need this capability, as OpenSwitch `switch` role needs
to handle multiple *.j2 files and supporting the include statement
inside jinja2 file is essential, otherwise I need to combine multiple
template files into a single file, which easily causes conflicts
between developers working on different parts of the teamplate, ports
and interface.
9 years ago
camradal af5195e336 vCloud module utils error handling bug fixes (#15859)
* Fix AttributeError that hides login errors

* Typo fixes for vca error messages
9 years ago
Robin Roth 03e7f54071 Don't use 'from ansible.module_utils import foo' style here as it breaks (#15756)
py.test"
9 years ago
James Cammarata 0ad0b3d83b New release v2.1.0.0-0.2.rc2 9 years ago
James Cammarata b40948acd9 Adding accelerated mode deprecation to the CHANGELOG 9 years ago
James Cammarata cc347dcaa9 Adding a deprecation message for accelerated mode 9 years ago
James Cammarata 4c5dddb25a Reworking retry/until logic to fix bugs
Prior to this patch, the retry/until logic would fail any task that
succeeded if it took all of the alloted retries to succeed. This patch
reworks the retry/until logic to make things more simple and clear.

Fixes #15697
9 years ago
jctanner b181fe0bc2 Disable sftp batch mode if sshpass (#15829)
Make use of the -oBatchMode=no option to force password prompts from sftp

Addresses #13401
9 years ago
Toshio Kuratomi 71c7476199 Update submodule refs 9 years ago
Matt Martz 9121ca2f8e Use .code instead of .getcode() as py24 does not have .getcode(). Fixes https://github.com/ansible/ansible-modules-core/issues/3608 9 years ago
Toshio Kuratomi cae6240e5e Ship constants to the modules via internal module params rather than a secondary dict. 9 years ago
James Cammarata 2f302e26f4 Make sure setting facts with run_once makes copies of the data
When using run_once, there is only one dict of facts so passing that
to the VariableManager results in the fact cache containing the same
dictionary reference for all hosts in inventory. This patch fixes that
by making sure we pass a copy of the facts dict to VariableManager.

Fixes #14279
9 years ago
Matt Martz 1968bc5952 Cascade ssh_*args configurations in synchronize instead of limiting to just ssh_args. See https://github.com/ansible/ansible-modules-core/issues/3370 9 years ago
Matt Martz 047d62cce3 Guard against a shell profile printing extraneous data 9 years ago
James Cammarata 1c2f0ae8f7 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
9 years ago
James Cammarata 3a052654f3 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
9 years ago
Carl 2a512affde 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
9 years ago
Toshio Kuratomi 90fb1fb3fa If we can't squash for any reason, then simply do not optimize the items loop.
Also add more squashing testcases

Fixes #15649
9 years ago
Toshio Kuratomi 8cd0c432e7 Fixed importing the libcloud modules to give a nice error rather than a traceback. 9 years ago
Vic Iglesias 151df71464 Update GCE module to use JSON credentials (#13623)
* Update GCE module to use JSON credentials

* Ensure minimum libcloud version when using JSON crednetials for GCE

* Relax langauge around libcloud requirements
9 years ago
James Cammarata d22898a27c 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
9 years ago
Lars Kellogg-Stedman 22b86bbb63 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.
9 years ago
Andrew Taumoefolau 00b04ab794 Apply inventory host restrictions by host name rather than UUID.
Issue #15633 observes that a meta: inventory_refresh task causes the playbook
to exit. An inventory refresh flushes all caches and rebuilds all host
objects, assigning new UUIDs to each. These new host UUIDs currently fail to
match those on host objects stored for restrictions in the inventory, causing
the playbook to exit for having no hosts to run further tasks against.

This changeset attempts to address this issue by storing host restrictions
by name, and comparing inventory host names against these names when applying
restrictions in get_hosts.
9 years ago