59 Commits
Author SHA1 Message Date
James Laska 3c1fe28bed Correct broken DEB builds by fixing LC_TIME assignment
Fixes a `make deb` build failure introduced by
c41adc32c2
2015-11-02 12:30:36 -05:00
James Laska 1359bbee87 Fix traceback with using GCE on EL6 with python-crypto2.6
This fix resolves an issue on EL6 systems where there may be multiple versions
of pycrypto installed.  EPEL provides both `python-crypto` and
`python-crypto2.6`.  These packages are co-installable.  However, modules
importing the `Crypto` library must specify which version to use, otherwise the
default will be used.

This change follows the same pattern established in `bin/ansible` for
specifying python library requirements.
2015-04-20 12:49:25 -04:00
James Laska bbc05a2cf5 Improve generation of debian changelog 2015-04-09 09:30:56 -04:00
James Laska f451974efe Use correct URL for travis status badge
This uses the `devel` branch when displaying the travis-ci status badge.
2015-03-13 10:56:30 -04:00
James Laska 60acdee0dc Enable assert_raises_regexp on py26 2015-03-13 08:21:14 -04:00
James Laska 3d67e9e0c0 Add tox and travis-ci support
Add tox integration to run unittests in supported python releases.
Travis-CI is used for test execution.

Additionally, the unittest TestQuotePgIdentifier was updated to support
using assert_raises_regexp on python-2.6.

Sample travis-ci output available at
https://travis-ci.org/ansible/ansible/builds/54189977
2015-03-13 08:20:24 -04:00
James Laska 684352926b Resolve issue where repo_path contains multiple '.git' strings
If the repo_path contained multiple '.git' strings, the _git_repo_info()
call resulted in a traceback.  This change removes the trailing '.git'
and resolves the traceback.
2014-09-30 10:33:42 -04:00
James Laska a0fecd6101 Fix packaging to work with new module location
Changes include:
 * Remove references to old module dir from .spec
 * Use setuptools find_packages find all ansible packages
2014-09-29 10:22:15 -04:00
James Laska 6cd55a5e95 Correct mysql integration indentation 2014-09-10 17:56:28 -04:00
James Laska b7c7476359 Include el7 mariadb support in mysql integration test 2014-09-10 16:33:21 -04:00
James Laska 6c3999b898 Make debuild happy by including a date in debian/changelog
The previous commit resolved the debian build problem, but was building
packages with the stable version.  A development version is required in
the changelog to properly build development DEB packages.
2014-08-07 08:38:23 -04:00
James Laska c98456a73d Fix debian builds by correcting debian/changelog
Remove 1.8 debian/changelog entry with a date of "TBD" as this causes
the debian build process to fail.  We can add this back with the 1.8
release becomes a reality, or add it back now with a valid date in the
future.
2014-08-07 08:18:34 -04:00
James Laska d202616213 Merge pull request #8426 from jlaska/update_integration_Makefile
Include unicode and var_precedence tests in 'all' target
2014-08-04 13:42:01 -04:00
James Laska b40f1ddc19 Require python-crypto >= 2.6 for debian package builds
The ansible PyPi package, and RPM both require crypto>=2.6.  This change
carries that dependency into the ansible DEB package.  Note, for
ubuntu-12.04, this dependency is only satisfied by a PPA.  Users
installing from 'ppa:ansible/ansible' will not be affected..
2014-08-04 13:17:25 -04:00
James Laska d4a78dc951 Include unicode and var_precedence tests in 'all' target 2014-08-04 09:50:30 -04:00
James Laska 7288a6095b Several azure fixes
Several azure fixes/improvements, including:
* Improve failure message when python-azure is not installed
* Improve required argument handling
* Fixes a traceback on instance termination when the variable
'deployment' was not set.
* Fixes a traceback (#8298) when creating instances using the newer SDK
2014-07-30 16:28:13 -04:00
James Laska d51e10a3f4 Correct BotoServerError typo in ec2 module
Resolves a traceback due to an undefined 'BotoSeverError' exception.
2014-07-26 12:11:25 -04:00
James Laska 03efbfca29 Correct string concatenation error 2014-07-17 08:57:47 -04:00
James Laska 2e7ad0899f Update docs to mention new PPA 2014-07-16 12:26:17 -04:00
James Laska 4046d1fd0d Correct Makefile variable usage 2014-06-20 19:59:09 -04:00
James Laska 411311495f Updated DEB build workflow
Updates to Makefile include:
 * add targets: deb-src, deb-src-upload, deb-upload
 * add variables to control DEB building: DEBUILD_OPTS, DPUT_OPTS, DEB_PPA, DEB_DIST, DEB_RELEASE
 * create deb files for all release values in DEB_DIST

Several updates to packaging/debian/*
 * Updated control file
 * Whitespace/formatting of changelog

Add deb-build to .gitignore
2014-06-20 16:09:02 -04:00
James Laska 4ee0898fc9 Assert the MOCK_CFG exists for the mock-rpm build target 2014-05-09 09:01:44 -04:00
James Laska 346d02e3b4 Improve OFFICIAL build conditional test
An unofficial build is any build where OFFICIAL != yes.  This patch adjusts the
conditional accordingly.
2014-05-08 14:57:14 -04:00
James Laska eede23ab0d Add support for rpm builds through mock 2014-05-08 14:47:20 -04:00
James Laska d314f1b038 [test_apt_repository] Verify that 'python-apt' auto-installs correctly
Remove 'python-apt' before testing the 'apt_repository' module.  The
'apt_repository' module has the smarts to auto-install python-apt.  The
integration test will now assert the correct auto-install behavior.
2014-05-07 09:28:01 -04:00
James Laska f96618c967 Use proper YAML quotes to fix webdocs 2014-03-30 14:26:18 -04:00
James Laska 6c8d8a746f Fix YAML docstring that broke webdocs 2014-03-29 19:15:42 -04:00
James Laska 750d9e2d59 Update credentials.yml documentation and handling
Changes include:

 * Update Makefile to use credentials.yml when it exists
 * Add details on the use of the credentials.yml file to README.md.
 * Update credentials.template comments
2014-03-18 10:17:44 -04:00
James Laska 4ef2603a62 Add yum+apt integration tests for auto dependency installalation
The `apt` and `yum` modules will automatically install python dependencies.
This change updates the existing integration tests to test whether auto-install
of dependencies is functioning properly.
2014-03-17 10:42:29 -04:00
James Laska aacccd441b Add integration test for apt_repository
Tests several ways to specify the repository.  For every repo added, the test
asserts that:

 * the apt-cache was updated as expected (depends on `update_cache` parameter)
 * the PPA key was installed (depends on `repo` format)
2014-03-14 13:07:12 -04:00
James Laska 5cfefb326a Correct check_mode conditional logic
The desired behavior is to _not_ add the ppa signing key when check_mode is
enabled.  This fix corrects the conditional logic to comply with the stated
behavior.
2014-03-14 10:24:52 -04:00
James Laska 07dd02c25a [test_ec2*] cloud integration test updates
To support parallel cloud test execution, create and provide a random string to
cloud integration tests.  The variable 'resource_prefix' can be used in cloud
roles and during resource cleanup to safely create/destroy cloud-based
resources.

Additional changes include:

 * The roles test_ec2_key and test_ec2_group were updated to use to
 {{resource_prefix}}.

 * Additionally, the Makefile was updated to set resource_prefix to a random
 string.  The Makefile will also use 'resource_prefix' during cloud_cleanup.

 * All test_ec2* roles were updated to add 'setup_ec2' as a role dependency.
2014-03-13 11:28:02 -04:00
James Laska 9cc4be2683 Correct test integration ec2 cleanup script 2014-03-12 19:29:46 -04:00
James Laska bc678e7d7b Add credentials.template and support custom INVENTORY
Testers may override the inventory and vars-file using the environment
variables 'INVENTORY' and 'VARS_FILE'.
2014-03-12 15:45:10 -04:00
James Laska 5c9dc33e41 Additional test_git scenarios
Includes coverage for accept_hostkey and additional scm URL formats.
2014-03-12 15:45:10 -04:00
James Laska 2a723e908e Fix issue#6430 by instantiating Network() with expected arguments 2014-03-12 09:04:42 -04:00
James Laska 551cb1892b Always run cleanup after running cloud_integration tests 2014-03-12 08:37:01 -04:00
James Laska 7345495655 Add generated test files to .gitignore 2014-03-11 09:21:33 -04:00
James Laska c7d1c1a306 [test_service] correct upstart service name and permissions
The 'service' utility was unable to find the 'ansible_test' service due to an
unexpected filename.  This patch corrects the filename and adjusts the
permissions to match other service scripts within /etc/init/.
2014-03-07 10:42:13 -05:00
James Laska 868746b095 Correct ansible_distribution typo
Redhat != RedHat
2014-03-06 16:16:00 -05:00
James Laska ba9950a73a Use correct value of ansible_distribution in integration tests
This fixes integration tests when run on a RHEL system.  Oddly, the
ansible_distribution='RedHat' when run on RHEL.
2014-03-06 15:52:15 -05:00
James Laska b589bf1d2e First pass at ec2 module tests 2014-02-26 16:43:30 -05:00
James Laska 40e0204051 Correct assert and add with_items test 2014-02-24 15:07:23 -05:00
James Laska a77ea0f942 Allow custom nosetests parameters
The NOSETESTS variable can be used to support customizing the nosetests
parameters.  This allows providing custom nose parameters such as
--with-coverage.
2014-02-21 15:37:16 -05:00
James Laska dbd3194e9c Resolves issue#6067 by allowing exact_count=0 2014-02-19 16:29:15 -05:00
James Laska 5bdd30da8a Fix debian builds by adding a missing ',' 2013-12-19 08:19:10 -05:00
James Laska 4013e94cf6 Correct documentation URLs 2013-11-08 15:02:45 -05:00
James Laska 2a5874b94f Honor wait on ec2 instance termination 2013-11-01 18:57:20 -04:00
James Laska e002496f0e Add idempotency support to ec2_group 2013-10-02 11:29:59 -04:00
James Laska 03252e1d30 [cloud/rax] support wait on delete
Add support to existing rax module to honor the wait (and wait_timeout)
parameters on delete operations.  This patch removes existing logic in favor of
the built-in pyrax.utils.wait_until method.
2013-09-20 13:49:39 -04:00
James Laska 546788a1b6 The required package for selinux is libselinux-python 2013-09-06 16:26:48 -04:00
James Laska 95a22338a2 Resolve incompatability between depth and version
Git is unable to checkout the specified `version` when the repository is
cloned with a reduced history (`depth`).  However, if the repository is
already cloned, subsequent git module calls will update the repository
(default update=True), then properly checkout the specified `version`.
To allow the initial call to properly clone the specified `version`, at
the specified `depth`, this patch adds the `--branch` parameter when
cloning the repository.
2013-07-18 17:03:17 -04:00
James Laska 4311412b44 Correctly load up2date configuration
Previously, a configuration file name of None was being passed into
up2dateInitConfig().  This resulted in a correct configuration import,
but failed to properly save the configuration back to disk in the event
a different serverURL was supplied.  This change removes support for
customizing the up2date filename entirely, and relies on up2date to
choose the default config filename.
2013-06-24 13:00:23 -04:00
James Laska eb2ae8b3c2 Reference major_release, not major_version 2013-06-20 08:23:49 -04:00
James Laska 6059ce34e3 Minor adjustments to subscription_manager and rhnreg_ks 2013-06-07 14:18:23 -04:00
James Laska 65993e8f35 Reorganize subscription_manager module.
Also ...
 * When unregistering, first unsubscribe from all content
2013-06-07 14:07:00 -04:00
James Laska a2cbcec328 The rhnreg_ks module acts as a wrapper to the command 'rhnreg_ks'. The
rhnreg_ks command allows users to manage registration to a Red Hat
Network (RHN) (e.g. rhn.redhat.com) server.  The moduel will also
interact with the specified RHN system via XMLRPC as needed.

Before proceeding with registration, the rhnreg_ks module will enable
the system to receive updates from RHN.  This involves enabling the
appropriate RHN yum plugin, as well as disabling an active
subscription-manager yum plugin.

Once enabled, the module will support the following operations:
 * configure
 * register
 * subscribe to custom child channels (see `rhn-channel` command)
 * unregister
2013-06-07 13:45:25 -04:00
James Laska 19b7cb6653 Updated examples and documentation 2013-06-06 16:30:06 -04:00
James Laska 3ba19bf369 Add RHN subscription_manager module
The subscription_manager module acts as a wrapper to the command
'subscription-manager'.  The subscription-manager utility allows users
to manage RHN registration, subscription and yum repositories from the
Red Hat Entitlement platform.

Currently, this module supports the following sub-commands:
 * config
 * [un]register
 * subscribe
2013-06-06 15:00:38 -04:00