Commit graph

32948 commits

Author SHA1 Message Date
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)
2017-09-25 15:06:05 -04:00
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)
2017-09-25 12:31:34 -04:00
Ganesh Nalawade
3680d28e58 Increase pause time in junos integration test (#30740) (#30799)
*  Increase pause time to a value greater
   than persistent connection timeout to clean
   out socket path.
(cherry picked from commit c3d226a739)
2017-09-23 18:42:00 +05:30
Brian Coca
2eac554eb4 use set to quicken group host membership
(cherry picked from commit 3f9a885b83)
2017-09-22 19:09:40 -04:00
Brian Coca
956b6ece86 dont validate group names in yaml plugin
(cherry picked from commit a819cfcad7)
2017-09-22 19:06:09 -04:00
Toshio Kuratomi
93559a7faf Add ssh path fix to changelog 2017-09-22 15:33:13 -07:00
Toshio Kuratomi
4afe8ed2ef Fix encoding error with path to ssh
As reported on the mailing list, if ssh_executable (from a config
setting) contains nonascii characters then we could get a UnicodeError
here.  Transform into bytes before passing to subprocess so that
subprocess doesn't transform to bytes for us.

(cherry picked from commit 86d8a4ff50)
2017-09-22 15:31:50 -07:00
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)
2017-09-22 14:24:57 -04:00
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
2017-09-22 15:20:09 +05:30
Brian Coca
304377aa82 added missing 2.4 clog entry 2017-09-21 23:56:46 -04:00
Toshio Kuratomi
5048f46340 Fix docker_service python3 incompatibility
Looks like this is supposed to operate on native strings so there's no
need to encode or decode at all here

Fixes #30354

(cherry picked from commit f66c74915c)
2017-09-21 19:51:31 -07:00
jborean93
c5f5277183 Updated changelog to include win_power_plan fix 2017-09-22 06:24:26 +10:00
Serge Nikalaichyk
22f352490d Fix OS version check in win_power_plan (#30538)
* Fixed win_power_plan OS version check

* Original error message case

(cherry picked from commit dc8aedb274)
2017-09-22 06:23:41 +10:00
jborean93
70c1320c08 Updated changelog with win_domain_membership fix 2017-09-22 06:11:58 +10:00
Jordan Borean
34ceed635d win_domain_membership: added better error handling and basic tests (#30674)
(cherry picked from commit fb628acb6e)
2017-09-22 06:10:14 +10:00
Hervé Beraud
9bc6cca9f8 [fix] no-unicode-literals sanity error on ansible.egg-info (#30446)
* [fix] no-unicode-literals sanity error on ansible.egg-info

(cherry picked from commit 0e9ae5b8cc)
2017-09-21 12:48:03 -07:00
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_*
2017-09-21 14:43:45 -04:00
Sloane Hertel
bc0b069cb7 Remove invalid e.response from BotoCoreErrors in ec2_asg.py (#30121) (#30495) (#30715) 2017-09-21 13:53:04 -04:00
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)
2017-09-21 10:02:23 -04:00
Sloane Hertel
2fca9d5530 [cloud] Fix broken LimitExceeded check in iam_managed_policy (#30537) (#30626)
When policy versions exceed 5, we hit LimitExceeded. However,
the exception checking should use `e.response['Error']['Code']`
2017-09-21 08:29:39 -04:00
Sloane Hertel
64f54fa6e2 [cloud] Fix aws_s3 backwards compatibility of put/get options (#30580)
Previously to use the modes put or get the object had to be specified with a leading /. Since the boto call doesn't take an object like that this was overlooked and removed. Added a check to remove that leading character.
2017-09-21 08:29:15 -04:00
Ganesh Nalawade
6f461fbfd0 Increase socket connect retry timeout for integration test (#30681) (#30683)
*  Increase persistent connection local socket
   retry timeout to fix intermittent failure in
   network integration test
(cherry picked from commit 869cd6f729)
2017-09-21 11:02:22 +01:00
Toshio Kuratomi
aa808e1eb6 Add changelog entries for cherrypicks over the previous day. 2017-09-20 19:54:58 -07:00
Willem van Ketwich
1880aa86b5 fix for unrequired parameter
(cherry picked from commit 92426840d6)
2017-09-20 19:48:28 -07:00
jborean93
b92452f775 fix for make webdocs
(cherry picked from commit 0e22afef52)
2017-09-20 22:46:50 -04:00
Toshio Kuratomi
11cc64db21 Fix python3 and nonascii handling in inventory plugins
Fixes #30663

(cherry picked from commit 72bdf7aa7e)
2017-09-20 19:39:38 -07:00
Brian Coca
46fd30d420 moved from eval to templating + literal_eval
(cherry picked from commit f12c6e0946)
2017-09-20 19:38:45 -07:00
Vladimir Utenkov
804a308ab3 [cloud][py3] Fix AttributeError in iam_policy on python3 (#30551) 2017-09-20 17:15:03 -07:00
Dylan Silva
da56535ffc Updated release table for docs (#30649) (#30659)
- Updated table to reflect release of 2.4
- Added in 2.5 as current devel
2017-09-20 16:19:48 -07:00
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)
2017-09-20 16:39:47 -04:00
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)
2017-09-20 15:21:20 -04:00
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)
2017-09-20 15:13:01 -04:00
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)
2017-09-20 11:15:42 -04:00
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)
2017-09-20 11:00:42 -04:00
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
2017-09-20 09:22:48 -04:00
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
2017-09-20 14:35:15 +05:30
jborean93
fef04420c9 Updated changelog with camel conversion fixes 2017-09-20 15:25:35 +10:00
Jordan Borean
35c867d890 CamelConverter - more fixes picked up in testing (#30601)
(cherry picked from commit a940eb1e80)
2017-09-20 15:24:49 +10:00
Jordan Borean
98425291d1 CamelConversion: fix to not convert string values (#30595)
(cherry picked from commit 1ea0293878)
2017-09-20 15:24:32 +10:00
Adrian Likins
6d5f2dccb2 Misc docsite fixes (#30290)
* Fix refs for local_facts and various cli :option:
* Fix dev_guide/testing_pep8 refs
* remove ref to non-existing 'developing_test_pr'
* Fix ref to ansible-vault encrypt_string
* Removed hard-to-localize colloquialism.
* Rename '_ansible-pull' in playbooks_intro.

It was conflicting with rst/ansible-pull.rst. Nothing
seems to reference it.

* Add explicit targets for and update refs

Replace some ':doc:' use with ':ref:'.

Replace some :ref: to section names with explicit targets
(:doc:`Dynamic vs. Static` -> :ref:`dynamic_vs_static` etc)

* The 'YAML+Jinja' syntax lex fails here, so just use yaml

Since the yaml+jinja highlight fails, code wasnt highlighted
at all, but 'yaml' works more or less.

* just use no lexer for the < python2.6 examples

py3 will fail highlighting them, and 'python2' throws
a lexer warning, and nothing actually highlights it, so
just disable.

(cherry picked from commit 9cc63326b1)
2017-09-19 16:18:11 -07:00
Brian Coca
9ae683e9f4 added missing feature info (#30560)
* added missing feature info

(cherry picked from commit 22c8522cbf)
2017-09-19 17:44:08 -04:00
Brian Coca
aea9bab2ab fixed password lookup docs
(cherry picked from commit 71cc906ec8)
and chlog update
2017-09-19 16:34:14 -04:00
Toshio Kuratomi
0c843b70cc Fix jenkins_plugin test for no net situations (#30568)
Unittests are sometimes run without network connectivity in build
systems.  Make that work correctly by mocking out _get_url_data with the
expected return value.
(cherry picked from commit 0a69e27e62)
2017-09-19 13:13:10 -07:00
Chrrrles Paul
22acb4b733 oc module- Fixing description & removing example command (#30257)
* Fixing description & removing oc/adm example

Noticed formatting errors on http://docs.ansible.com/ansible/latest/oc_module.html -- also removing oc/oadm command examples

* Trailing whitespace..

(cherry picked from commit e3ef80f5d6)
2017-09-19 16:11:23 -04:00
Brian Coca
8ccbff08f5 fixed decreption
(cherry picked from commit 1cee81375386a7f3ac3d1893342b9323983f00c9)
(cherry picked from commit b9120dfd97)
2017-09-19 13:00:56 -07:00
Toshio Kuratomi
3b86554081 Add a code-smell test for smart quotes and remove smart quotes from all files
(cherry picked from commit c82cf791dd)
2017-09-19 13:00:56 -07:00
Rene Moser
c3c5869ada update changelog 2017-09-19 13:00:56 -07:00
Ondra Machacek
ba9a84f02a ovirt_vms: Fix the logout condition (#30410)
(cherry picked from commit 0aebdb4aca)
2017-09-19 13:00:56 -07:00
jborean93
6296b906fb Updated changelog for windows module util list fix 2017-09-19 13:00:56 -07:00
Jordan Borean
8a247989c5 windows: fix list type in legacy module utils (#30483)
* windows: fix list type in legacy module utils

* only change the return for the list type instead of affecting it all

* additional null check when using an array

(cherry picked from commit 01563ccd5d)
2017-09-19 13:00:56 -07:00