Commit Graph

8202 Commits (d7b6289539208c41e4547fbbb86c4a53cfca4ea0)
 

Author SHA1 Message Date
Dag Wieers 983cdd00bc Making unarchive idempotent (#3307)
* WIP: Making unarchive idempotent

Currently unarchive is not idempotent and has many rough edges and bugs.
The current release is a workable improvement on many fronts:

- zip support is now idempotent (but gtar lacks check-mode)
- New option `exclude` to exclude specific paths/files
- New option `keep_newer` to exclude newer files on target
- New option `extra_opts` to influence unzip/gtar (like synchronize module)

The following items are still ongoing:

- Implement CRC32 support for .zip files
- Re-implement the zip support using native zipfile module
- Re-implement the gtar support using native tarfile/gzip/bz2 modules (lzma external)
- Implement check-mode (works in gzip, but fails using gtar)
- Implement diff-mode (discuss an appropriate output model, like synchronize module)

The re-implementation of unzip/gtar support using native python modules will not only simplify the codebase, additional functionality can be implemented correctly and identically, which is currently not possible. (Other archives could be implemented using native modules equally, incl. options)

* Assorted fixes to zip support (during quality checks)

- Support both rw---- and rwx--- permstr
- Better file type support (more qa needed)
- Symlink support
- Include fix from #3229

* Implement zip diff-mode (itemized change) and avoid changes permissions every time (!)

This commit implements:
- rsync-compatible itemized-change output in diff-mode (using zip)
- no longer changing permissions unconditionally (when idempotent)

* Small fixes to itemized change output

* Fixes to user/group ownership changes

- The implementation of user/group ownership is a bit more complex for idempotency
- We report when a ZIP file incorrectly tags a directory as a file/link
- We only offer diff output when there is a change

* Fix the handling of includes and excludes for unzip

* Remove test output from output (confuses easily)

* Logic and performance improvements to ownership handling, and umask fix

* Handle special files (type '?')

* Make exceptions compatible with python 2.4

* Implement CRC32 support

* Revert some unintended/unknown changes ?

* Taking over maintenance as offered by current maintainer

* Fix support for white-spaces in filenames

* Remove/rename incorrect regex

* Ensure that fat executables end up with execute permission

* Remove check_result from output when unchanged

* When unarchiving as a user, or when owner/group/mode is supplied --diff is insufficient

Only way to be sure is to check request with what is on disk (as we do for zip).
Leave this up to set_fs_attributes_if_different() instead of inducing a (false) change

* By default, don't send confusing check_results in verbose output

This fixes #74.
9 years ago
NielsH ab699a0953 Resolve idempotency issue with virtual apt package (#3449)
Virtual packages were always marked as upgradable which caused the changed-state even though nothing changed.
9 years ago
Tobias Wolf dba53b5543 Add diff to apt.py (#2944)
for install, remove, deb_install, and upgrade.

Since apt has very commonly familiar output, just use the normal output
from apt-get or aptitude -- trimmed to the interesting parts -- to show
to the user if she specified --diff on the CLI.

Uses the recent support for the `diff['prepared]` key.

Fixes ansible/ansible#10239
9 years ago
Oleg Senin 377e94f77f Correct misspell (#3454) 9 years ago
Kei Nohguchi 795b3c25cd ops_template.py: Taking care of the JSON src variable (#3313)
* ops_template.py: Taking care of the JSON src variable

* ops_template.py: Specify type='str' for src argument to be explicit
9 years ago
Marcin 5312627091 rebase for #2477, ready_for_review (#2581) 9 years ago
Michael Fenn 09f14731f2 Support altering the virtual cdrom when state == reconfigured (#2394)
This allows a user to modify the state of the virtual cdrom in a VM
by using the state == reconfigured action.  This is useful for
provisioning VMs from templates which do not have ISO images connected.
9 years ago
Alexey Wasilyev 1c3071af61 docker: support polling image by digest (#2932) 9 years ago
Joel Thompson a39d11e8f5 Add exponential backoff retries to ec2_elb_lb (#3379)
ec2_elb_lb doesn't react well to AWS API throttling errors. This
implements an exponential backoff operation around some of the AWS API
calls (with random jitter, in line with AWS recommendations) to make
this more resilient.
9 years ago
Patrick Ogenstad 5409ed1b28 Fix documentation example, missing ")" 9 years ago
Donovan Jones 7c52ea58f1 Make remote_group handle name and id in cloud/openstack/os_security_group_rule.py
* Make remote_group handle name and id

* fix regression breaking os_security_group_rule with no remote_group
9 years ago
Robin Roth f1bacc1d3f make git updates respect depth (#3254)
* make git updates respect depth

until now `fetch` gets all tags and heads at full depth, this change
* uses `depth` argument for `fetch`
* only get the specified `version` in `fetch`

* fixes #14954

* treat combination of refspec and depth correctly

* be more conservative for non-depth fetch
9 years ago
jjshoe ea199ecac0 Give encoding examples (#3436) 9 years ago
David Shrewsbury 25e75e66eb Merge pull request #3236 from rcarrillocruz/network_by_project
Add project parameter to os_network
9 years ago
Ricardo Carrillo Cruz 3e93204598 Add project parameter to os_network
A cloud/domain admin should be able to create a network on any project
it is granted to.
This changes adds the possibility to pass either a project ID or
project name.
9 years ago
David Shrewsbury cea5ceb644 Merge pull request #3237 from rcarrillocruz/os_subnet_by_project
Create subnet by project
9 years ago
yarick123 bf2f09e37c ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol
* ini_file: added option 'noextraspaces' to turn off inserting extra spaces around '=' symbol

* ini_file: noextraspaces, python 2.4 compatibility

* ini_file: noextraspaces - yes/no => true/false

* ini_file: noextraspaces - added 'version_added' option

* ini_file: noextraspaces => no_extra_spaces
9 years ago
Sandra Wills 086735e255 Merge pull request #3400 from gaomd/patch-1
Improve doc accuracy of template module
9 years ago
hyperized 48fa3a5243 Set --quick to True by default and make it selectable (#3418)
As indicated by @jmainguy in eb1cb94380 (commitcomment-17077470), this will allow the user to set the option quick, which is True by default (as it was before).

This is in reference to: https://github.com/ansible/ansible-modules-core/pull/3402
9 years ago
James Cammarata 79ff959635 Merge pull request #3417 from jkugler/fix_mount_passno
Fix mount's handling of passno
9 years ago
Mengdi Gao 4ff5218903 Improve doc accuracy of template module 9 years ago
Joshua Kugler 05109d16ec Fix mount's handling of passno 9 years ago
Michael Moussa ff414b79f2 Fixes read replica create BC break (#3365) 9 years ago
William Holroyd 4837b04668 Added ap-northeast-2 region (#2849) 9 years ago
Rob 68c8669200 Fix to ensure youngest snapshot is retrieved rather than oldest (#3115) 9 years ago
jjshoe 52823bdb5b Speed up AMI code by not attempting to create the AMI without checkin… (#2551)
* Speed up AMI code by not attempting to create the AMI without checking on the name first. Also simplifies code for reporting errors from AMI creation, greatly.

* remove sys.exit
9 years ago
Petrox 99cd31140d Missing documentation fix (#2516)
Extending the documentation to state, that this module does not handle externals well.
9 years ago
Marcin 2e20e548f8 Check if identifier is specified for geo,weighted or failover routing. Don't fail if record set already exist. Set choices for failover - capital PRIMARY and SECONDARY. (#2470) 9 years ago
Fabian von Feilitzsch edc8698c14 make binds a list instead of a dict (to prevent overwriting when copying the same file to two places) (#2294) 9 years ago
Matt Davis 1c01e826d6 Merge pull request #3352 from gundalow/docsrh_subs
ansible-validate-modules part 3: Add copyright notice for Barnaby Court (@barnabycourt)
9 years ago
Matt Davis 6d0e9327e3 Merge pull request #3342 from gundalow/docsfix
ansible-validate-modules part 1: Correct documentation
9 years ago
Ricardo Carrillo Cruz 8a03ae5287 Create subnet by domain
A cloud/domain admin should be able to create a subnet on any
project it is granted on.
This change adds the 'project' parameter that accepts either
a name (admin-only) or id.
9 years ago
Adrian Likins 72f6238d04 Update redhat_subscriptions 'server_insecure' docs (#3373)
'server_insecure' maps to the subscription-manager config
(/etc/rhsm/rhsm.conf) value for 'insecure' key in the
'server' stanza. The 'insecure' configures if the https connection
to 'server_hostname' is verified as having been issued by
a CA in 'ca_cert_dir' trust store.

Previous documentation indicating it disables https and
enables http was inaccurate. Connection to server_hostname
always uses https.
9 years ago
Robin Roth d3fa192968 use custom ismount function in mount module (#2737)
* based on cpython os.path.ismount
* includes patch from http://bugs.python.org/issue2466
* fixes #2186
* when the upstream bug is fixed this should be removed/rewritten
* use ismount from module_utils
9 years ago
hyperized eb1cb94380 Add single_transaction and quick options to MySQL DB module (#3402) 9 years ago
Michael Scherer 738e62e449 Mark path as type='path', do not leak login_password by error (#3396) 9 years ago
Michael Scherer a2c2a67170 Update the type of some arguments in mysql_db module (#3285)
login_password should not be logged, so mark it as 'no_log'
the others arguments are path to file, and so should be type='path',
which permit to remove the line handling '~' and shell variables.
9 years ago
Tom Paine c790519048 Update mysql_db.py
* Update mysql_db.py

Resubmission of https://github.com/ansible/ansible-modules-core/pull/2961 in single commit.

* Update mysql_db.py
9 years ago
Rene Moser 85c45d9fd1 openstack: doc fix, add version_added
see #3388
9 years ago
David Shrewsbury 99659036ca Merge pull request #3363 from rcarrillocruz/check_default_project_if_present
Only check default_project on resource creation
9 years ago
Matt Martz 31f23de5c5 Merge pull request #3391 from sivel/rax-dns-record-docfix
rax_dns_record: overwrite option was added for 2.1
9 years ago
Matt Martz e9227c4d8f overwrite option was added for 2.1 9 years ago
peter.jang c52f475c64 added rsync protocol support (#1999)
* added rsync protocol support

* correction for example document(add example for push on delegate)

* use startswith method for safety
9 years ago
Monty Taylor 265c3fdfb5 Merge pull request #3388 from Shrews/os_network_provider
Add support for provider network options
9 years ago
David Shrewsbury 29bd86394e Add support for provider network options.
Adds new parameters for specifying options for provider network plugins.
9 years ago
nitzmahone 2f46c35f47 fix win_user type checking
Fixed type checking to be more idiomatic powershell, also fixes a slew of StrictMode issues and gets error handling back to originally-intended behavior.
9 years ago
Toshio Kuratomi ee90762388 git still needs to have abspath applied to dest 9 years ago
David Shrewsbury 6970cc233f Wrap calls to main() with if check
A change was merged to the main Ansible core code that can cause

a potential hang if any libraries are called that use threading.

This change was:



  4b0aa1214c



This affected the os_object module by causing a hang on the shade

create_object() API call (which in turn calls swiftclient which

uses threading). The fix is to make sure all modules have a main()

that is wrapped with an "if __name__ == '__main__'" check.
9 years ago
John Barker 6b03f4afe6 Add copyright notice for James Laska 9 years ago
Peter Sprygada 6b8a92045f handles config replace properly in eos_template
fixes 3366
9 years ago