Commit Graph

1016 Commits (4ea1cc24ac92f997b9b50bd9fe15f61004c3dd1f)

Author SHA1 Message Date
Toshio Kuratomi 4ea1cc24ac Add os_image fix to changelog 7 years ago
Adrian Likins 4025b47629 Fix fact failures cause by ordering of collectors (#30777)
* Fix fact failures cause by ordering of collectors

Some fact collectors need info collected by other facts.
(for ex, service_mgr needs to know 'ansible_system').
This info is passed to the Collector.collect method via
the 'collected_facts' info.

But, the order the fact collectors were running in is
not a set order, so collectors like service_mgr could
run before the PlatformFactCollect ('ansible_system', etc),
so the 'ansible_system' fact would not exist yet.

Depending on the collector and the deps, this can result
in incorrect behavior and wrong or missing facts.

To make the ordering of the collectors more consistent
and predictable, the code that builds that list is now
driven by the order of collectors in default_collectors.py,
and the rest of the code tries to preserve it.

* Flip the loops when building collector names

iterate over the ordered default_collectors list
selecting them for the final list in order instead
of driving it from the unordered collector_names set.

This lets the list returned by select_collector_classes
to stay in the same order as default_collectors.collectors

For collectors that have implicit deps on other fact collectors,
the default collectors can be ordered to include those early.

* default_collectors.py now uses a handful of sub lists of
collectors that can be ordered in default_collectors.collectors.

fixes #30753
fixes #30623

(cherry picked from commit 95abc1d82e)
7 years ago
jborean93 f7b0908315 updated changelog for win_iis_webapppool fix 7 years ago
Toshio Kuratomi 1528a7ca60 Add ec2_snapshot_facts fix for python3 to changelog 7 years ago
Toshio Kuratomi 165432c9c1 lxc_container py3 fix in changelog 7 years ago
jborean93 f88c8e1df9 Updated changelog for sensu_silence fix 7 years ago
Brian Coca ec380da0f2 fixed lookup dig docs
also clarified dig module uses dnspython

(cherry picked from commit bb874e5029)
(cherry picked from commit 54d7c384b6)
7 years ago
Brian Coca fb2a533b81 fixed pull's ansible/git invocation options (#30938)
* fixed ansible/git invocation options

now falls back to using localhost as 'all' does not include implicit accidentally anymore

fixes #30636

(cherry picked from commit fc745920c7)
7 years ago
Toshio Kuratomi 5b08188318 Add crypttab pyhton3 fix to changelog 7 years ago
Brian Coca 53f865d094 rmeove ext requirement for yaml inventory plugin
returns to the state before 2.4 made it a requirement
fixes #30855

(cherry picked from commit 82de2e1865)
7 years ago
Brian Coca f993e213da added note about inventory_dir new behaviour (#30865)
* added note about inventory_dir new behaviour

(cherry picked from commit cd5cadfe69)
7 years ago
Brian Coca e9649a0598 fixed wrong changelog entry 7 years ago
Thomas Steen Rasmussen 25fafc1280 Remove stray " and replace include: with import_tasks:
(cherry picked from commit 22fda12ac1)
7 years ago
Brian Coca 64737e1446 corrected import_play into to import_playbook (#30853)
* corrected import_play into to import_playbook

fixes #30744

(cherry picked from commit 17f094bb6a)
7 years ago
Brian Coca 457b70ee90 fix for slack callback breaks in 2.4 (#30932)
* fix for slack callback breaks in 2.4

fixes #30838

(cherry picked from commit 8378ac30b3)
7 years ago
Matt Martz f628881750 Update API example for 2.4
(cherry picked from commit d40eff720c)
7 years ago
Toshio Kuratomi 999404121f Add jenkins_plugin CVE fix to the changelog 7 years ago
Adrian Likins 042079aa87 Use vault_id when encrypted via vault-edit (#30772)
* Use vault_id when encrypted via vault-edit

On the encryption stage of
'ansible-vault edit --vault-id=someid@passfile somefile',
the vault id was not being passed to encrypt() so the files were
always saved with the default vault id in the 1.1 version format.

When trying to edit that file a second time, also with a --vault-id,
the file would be decrypted with the secret associated with the
provided vault-id, but since the encrypted file had no vault id
in the envelope there would be no match for 'default' secrets.
(Only the --vault-id was included in the potential matches, so
the vault id actually used to decrypt was not).

If that list was empty, there would be an IndexError when trying
to encrypted the changed file. This would result in the displayed
error:

ERROR! Unexpected Exception, this is probably a bug: list index out of range

Fix is two parts:

1) use the vault id when encrypting from edit

2) when matching the secret to use for encrypting after edit,
include the vault id that was used for decryption and not just
the vault id (or lack of vault id) from the envelope.

add unit tests for #30575 and intg tests for 'ansible-vault edit'

Fixes #30575

(cherry picked from commit a14d0f3586)
7 years ago
Will Thames a2525658f9 Remove print statements from play_context
Caused spurious output, particularly obvious when in `become` mode

(cherry picked from commit ef56f9a44c)
7 years ago
Adrian Likins 2149d1092b Fix 'distribution' fact for ArchLinux (#30723)
Allow empty wasn't breaking out of the process_dist_files
loop, so a empty /etc/arch-release would continue searching
and eventually try /etc/os-release. The os-release parsing
works, but the distro name there is 'Arch Linux' which does
not match the 2.3 behavior of 'Archlinux'

Add a OS_RELEASE_ALIAS map for the cases where we need to get
the distro name from os-release but use an alias.

We can't include 'Archlinux' in SEARCH_STRING because a name match on its keys
but without a match on the content causes a fallback to using the first
whitespace seperated item from the file content as the name.
For os-release, that is in form 'NAME=Arch Linux'

With os-release returning the right name, this also supports the
case where there is no /etc/arch-release, but there is a /etc/os-release

Fixes #30600

* pep8 and comment cleanup

(cherry picked from commit 3eab636b3f)
7 years ago
Adrian Likins 3aa7941b72 facts: fix SPARC cpu count on linux (#30261)
On sparc64, /proc/cpuinfo has no usual 'model name', 'Processor', 'vendor_id', 'Vendor',
as a result "ansible_processor_vcpus" is always 1.
Add check element "ncpus active" to fix the issue.

(cherry picked from commit e93ecac0da)
7 years ago
Brian Coca 2eac554eb4 use set to quicken group host membership
(cherry picked from commit 3f9a885b83)
7 years ago
Brian Coca 956b6ece86 dont validate group names in yaml plugin
(cherry picked from commit a819cfcad7)
7 years ago
Toshio Kuratomi 93559a7faf Add ssh path fix to changelog 7 years ago
Adrian Likins bca1818b1e Fix pkg_mgr fact on OpenBSD (#30725)
* Fix pkg_mgr fact on OpenBSD

Add a OpenBSDPkgMgrFactCollector that hardcodes pkg_mgr
to 'openbsd_pkg'. The ansible collector will choose the
OpenBSD collector if the system is OpenBSD and the 'Generic'
one otherwise.

This removes PkgMgrFactCollectors depenency on the
'system' fact being in collected_facts, which also
avoids ordering issues (if the pkg mgr fact is collected
before the system fact...)

Fixes #30623

(cherry picked from commit 12404f470a)
7 years ago
Ganesh Nalawade ce963984d1 Fix command argument typo in telnet module docs (#30731) (#30734)
* Fix command argument typo in telnet module docs (#30731)

(cherry picked from commit 6d3307e472)

* Update Change log
7 years ago
Brian Coca 304377aa82 added missing 2.4 clog entry 7 years ago
jborean93 c5f5277183 Updated changelog to include win_power_plan fix 7 years ago
jborean93 70c1320c08 Updated changelog with win_domain_membership fix 7 years ago
Ryan Brown fd42243936 Split ec2_elb_* modules in service of rename/interface changes (#30716)
* Split ec2_elb_* modules in service of rename/interface changes (#30532)

* Undeprecate ec2_elb_*
* Make ec2_elb* full fledged modules rather than aliases
* Split tests for ec2_elb_lb and elb_classicb_lb
* Change names in documentation of old and new elb modules

Add tests for ec2_elb_lb

* Update CHANGELOG with new status of ec2_elb_* vs. elb_classic_*
7 years ago
Brian Coca 71c646fe59 become flags are primary
with new configuration the sudo flags are always set and become cannot override,
switching to simle 'or' will result in become_flags working.

also sudo_flags are deprecated.
also changed from YAML null causing a 'None' str

fixes #30629

(cherry picked from commit 236d13ac3a)
7 years ago
Toshio Kuratomi aa808e1eb6 Add changelog entries for cherrypicks over the previous day. 7 years ago
jborean93 b92452f775 fix for make webdocs
(cherry picked from commit 0e22afef52)
7 years ago
Brian Coca c4ce24966b dont override previous ini entries with defaults
corrected setting example, quotes mess up the regex
fixes #30633

updated chlog

(cherry picked from commit d3e85bd045)
7 years ago
Brian Coca 0c179133bf made callbacks backwards compatible (#30625)
* made callbacks backwards compatible
* note about porting guide
* deprecation notice so those callbacks get updated.

This fixes #30597 for those that were not inheriting from base.

Callback must either inherit from base (directly or indirectly),
which already implements this or implement set_options themselves.

(cherry picked from commit 131d417c7a)
7 years ago
Brian Coca 5fdcbdaaee More porting updates (#30635)
* Update porting_guide_2.4.rst with more docs and some rst fixes

(cherry picked from commit a030472092)
7 years ago
Adrian Likins a3d5b2f1ce Check number of vault secrets after setup. (#30520)
This is to catch vault secrets from config and
cli. Previously vault_password_file in config was
missed since it was added by setup_vault_secrets,
so check after setup_vault_secrets.

Related to #30514

(cherry picked from commit 174cb1f33c)
7 years ago
Adrian Likins f8ad9ca75d Don't ask for password confirm on 'ansible-vault edit' (#30514)
This is to match the 2.3 behavior on:

        ansible-vault edit encrypted_file.yml

Previously, the above command would consider that a 'new password'
scenario and prompt accordingly, ie:

        $ ansible-vault edit encrypted_file.yml
        New Password:
        Confirm New Password:

The bug was cause by 'create_new_password' being used for
'edit' action. This also causes the previous implicit 'auto prompt'
to get triggered and prompt the user.

Fix is to make auto prompt explicit in the calling code to handle
the 'edit' case where we want to auto prompt but we do not want
to request a password confirm.

Fixes #30491

(cherry picked from commit 307be59092)
7 years ago
Patrick Ogenstad fc97af8ab1 Restore correct coloring to selective callback (#30528)
* Restore correct coloring to selective callback

This fixes the bug raised in #30506

* Fix format issues for Python 2.6 & indent

Removed the zero length fields to support format under Python 2.6

Fixed E128 continuation line under-indented for visual indent issue

(cherry picked from commit d74c871559)

updated clog
7 years ago
Ganesh Nalawade 1cf00a5151 Add underscore and period to regex for hostname prompt (#30612)
* Add _ and . to regex (#30396)

Adding underscore and period to the nxos regex for determining the prompt for hostnames with underscores and periods in the hostname.
(cherry picked from commit 33b8d7069f)

* Add change log
7 years ago
jborean93 fef04420c9 Updated changelog with camel conversion fixes 7 years ago
Brian Coca 9ae683e9f4 added missing feature info (#30560)
* added missing feature info

(cherry picked from commit 22c8522cbf)
7 years ago
Brian Coca aea9bab2ab fixed password lookup docs
(cherry picked from commit 71cc906ec8)
and chlog update
7 years ago
Toshio Kuratomi 3b86554081 Add a code-smell test for smart quotes and remove smart quotes from all files
(cherry picked from commit c82cf791dd)
7 years ago
Rene Moser c3c5869ada update changelog 7 years ago
jborean93 6296b906fb Updated changelog for windows module util list fix 7 years ago
jborean93 d724bb584a Updated changelog to for win_file check mode fix 7 years ago
Toshio Kuratomi c235e8a863 Changelog entries for openssl_certificate fixes 7 years ago
Toshio Kuratomi c3821abc95 note in changelog that ec2_elb_lb, ec2_lb, and ec2_elb_facts are not deprecated yet.
We pushed renames of those modules to new names but have since decided
that we should rewrite the modules with better parameters and better
return values instead.  It's too late to fix the deprecations in 2.4.0
so make clear what we're going to do in the changelog for 2.4.0 and
promise to fix it in 2.4.1
7 years ago
Toshio Kuratomi 28da5199c4 List all of the new plugins 7 years ago