Commit Graph

15867 Commits (31045d58c659858c6ee9524411716a3d2a5f515b)

Author SHA1 Message Date
Sloane Hertel 00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 8 years ago
Brian Coca 35e03cb140 p8p 8 years ago
Brian Coca 27185f44b0 fix environment populated detection
fixes #23764
8 years ago
Ondra Machacek 13c2c292f2 cloud: ovirt: add note that modules works with RHV as well (#23808) 8 years ago
Brian Coca 4594bee65a keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

* deal with complex data for is_template

* typos
8 years ago
Brian Coca 3358abcf49 Add a new filter: strftime. Use the well known function to format a date output. (#23832)
(cherry picked from commit 3f5b304fc2)
rebased for @yannig
8 years ago
Ricardo Carrillo Cruz 8517fbf936 Remove catch-all regex on IOS terminal plugin (#23858)
We have a list of specific messages that we scree-scrape and flag
them as legit errors.
However, we also have a catch-all regex that matches everything
starting with %.
That can cause issues on commands that return lines with that
character, like for example the 'crypto key generate'.

Fixes #23770
8 years ago
Ganesh Nalawade 04ae977f39 Fix display argument defualt value (#23859) 8 years ago
Michael Scherer 78836ec0b9 Fix --force for unversionned requirements (#23391)
In current stable (2.2), ansible galaxy install --force do erase
a role, even if the version is not set. This commit should restore
that specific behavior, in accordance to people reports:
  https://github.com/ansible/ansible/issues/11266#issuecomment-273801480

It was also the behavior planned in the initial discussion:
"if you're not fixing versions in your roles file, then it's fine
to expect that the role will be reinstalled each time you run
ansible-galaxy install.", cf https://github.com/ansible/ansible/pull/12904
8 years ago
Ricardo Carrillo Cruz d0fd8cefaa Fix the iosxr_facts mem gathering (#23850)
We were not calling match.group, plus we were lacking a ':' from
the expected output of 'show memory summary'.

Fixes #23737
8 years ago
Trishna Guha 8ec4882ba0 Add eos_user module to users parameter (#23847)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
8 years ago
Ganesh Nalawade 01afe12cba Add doc for display argument of junos_command (#23804) 8 years ago
Matt Davis 02ed223d49 template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
8 years ago
Brian Coca 79b9c585ea less code
(cherry picked from commit 20d9f79a5250e764ffeddb046aeb82b7824ed952)
8 years ago
Brian Coca eb887b8062 Revert "fixes play context connection user (#21776)" (#23830)
* Revert "fixes play context connection user (#21776)"

This reverts commit 58ee661437.
fixes #23530

* preserve original in copy

updated comment to clarify wtf is going on here
8 years ago
Abhijeet Kasurde 527a7762e1 Use regex variable in eos_user.py (#23797)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Sloane Hertel 91644167c9 improve exception handling (#23722)
make pep8
8 years ago
Sloane Hertel 11c292bac2 route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option

* make route53_facts pep8 and remove from legacy files
8 years ago
Nathaniel Case 0c2a0c7bce Eos port default values (#23829)
* Hook port back up for eos cli transport

* The default values have moved

* Why not have conditional defaults?
8 years ago
Brian Coca b4b96143fe also skip polling when async failed 8 years ago
Nathaniel Case 9bcc3f298f EOS default transport (#23824)
* Give a default to eos transport
8 years ago
Matt Babineau 4914164717 Typo (#23778)
Missed that D...
8 years ago
Brian Coca fe9af903f3 script fails on async 8 years ago
Brian Coca 602a2bca1b fix vars file selection
fixes #17382
alternate to #22979

deal with cases in which group/host have . in name
updated as per feedbck
only be strict about extension when doing dirs
also avoid ~ endings
8 years ago
Brian Coca 3965689328 finer grained failed/skipped on async for actions
fixes #23729
8 years ago
Logan Attwood 5bbf0d9cb6 Use isfile check on package manager paths 8 years ago
Brian Coca 631a10745d fix hashing when path is symlink 8 years ago
Trishna Guha b2129a7d3a Add eos_banner as module to banner param (#23789)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
8 years ago
Loïc Blot 504a768636 Show UUID instead of name when using UUID to select snapshot (#23787) 8 years ago
Abhijeet cc745b0224 Minor typo in vmware_guest_facts (#23791)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Timo Benk 79943b86a1 fix ansible galaxy file mangling (#23703)
without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.

The previous code could affect the entire path and even filenames.
If a file path has the top level dir name as a substring, galaxy
replaces it with ''. In one example, the archive top level dir
is 'go', so 'files/go-bin.sh' becomes 'files/-bin.sh'.

Fixes #22572, #23694, #23623
8 years ago
Toshio Kuratomi a31e9bd9ea Really minor optimization and style change for d0e3d75381
* Use a generator expression instead of a list comprehension
* Use copy() to create a new set instead of the constructor.
8 years ago
Bart van Bragt d0e3d75381 Remove whitespace from unix group names 8 years ago
Abhijeet 27f776f97d Fix for setting values using gconftool-2 (#23713)
Miscallenous fixes added to make gconftool-2 work.

Fixes https://github.com/ansible/ansible/issues/23670

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Sloane Hertel d63af51f90 s3_sync: removing irrelevant s3.list_buckets() call - fixes #23409 (#23492)
* Removing irrelevant s3 call

Fix exception handling

Make s3_sync pep8 and remove from legacy file
8 years ago
Brian Coca 3f62dfda92 nicer docs 8 years ago
Adrian Likins ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
8 years ago
Matt Martz f82d95ae28 When become_method is su, self._play_context.prompt is a function. Fixes #23689 8 years ago
Ganesh Nalawade bf1a543f06 Make warning logs consistent (#23666)
* Make warning logs consistent

Arguments outside provider with default
value should not log as warning in case
it is not mentioned in play.

* Make nxos timeout default consistent and add comments

* Make comments more verbose
8 years ago
Daniel Shepherd 698fa37a44 [cloud] Fix #23152 in route53 module and pep8 cleanup (#23156)
update module to support more standard state=present/absent syntax

update module to use required_if, required_together, mutually_exclusive functions where possible

per ryansb review: make documentation section more clear, fix some extra quotes, remove FIXME comment

pre willthames review: force private_zone to True if vpc_id is set and fix word wrap
8 years ago
Brian Coca 586fcae398 tolerate 'batch' systems that mess with stdin (#23596)
* tolerate 'batch' systems taht mess with stdin

fixes #23541

* have pause on windows tolerate devnull

* tuplie
8 years ago
Brian Coca 1ef2b6b302 added mongodb lookup docs 8 years ago
Nathaniel Case 0b4cebfb8b nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
8 years ago
Yanis Guenane fdce6484ec crypto/openssl_csr: Specify proper Ansible version
The commit was started before 2.3 was branched, but was only merged once
2.3 was actually branched. This leads to documentation stating this
module is new in 2.3 when it will be actually new in 2.4
8 years ago
Kevin Brebanov 5775bb2a4e apk: Fix regex search patterns
Regex patterns were not being escaped properly so package names
containing characters that could be interpreted as regex symbols
were causing failures.

Fixes: #19714
8 years ago
adejoux 9f62ef7c0a Added AIX LV module (#20574)
* Added AIX LVM module

* implemented requested changes

* fixed Terabytes size calculation

* implemented recommendations from tmshn

* moved up lv display command definition

* added type to copies parameter

* applied recommendations

* missed chlv command

* fixed build error

* fixed typo in email address

* applied new pep reco

* fix bug
8 years ago
Will Thames 9229d53143 [cloud] Add ec2_vpc_dhcp_options_facts check mode (#23106)
* Support check mode in ec2_vpc_dhcp_options_facts

As a facts module, ec2_vpc_dhcp_options_facts supports check mode
by default

* ec2_vpc_dhcp_options_facts tidy up

Use named method imports, move imports to top of code
Use shared code to handle filters and tags
Use snake case for parameter names while retaining backward compatibility
8 years ago
Dag Wieers 071903b868 vmware_guest_snapshots: Add delegate_to directive to examples (#22933)
Without it it is not doing what most people would expect.
8 years ago
Toshio Kuratomi a06014663c display path to module_utils files in verbosity vvv. 8 years ago
Andrew Gaffney ce43e80d11 Allow specifying timeout on a per-host basis 8 years ago
Antoine Cotten 7c308b3f8c Fix nonexistent module_name in callbacks (#23587) 8 years ago
Ken Celenza b8507b676b Remove Warning for provider (#23652) 8 years ago
Nathaniel Case e1dcc01d3a pep8 fix for Shippable 8 years ago
Daniel bbb9f3164c Nxos vxlan vtep vni netcfg fix (#23620)
* Code cleanup
Removed 'add' method from CustomNetworkConfig.  It is identical
to the one inherited from NetworkConfig

* Removed unused CustomNetworkConfig import

* Replaced
```
def get_existing(module, args):
    existing = {}
    netcfg = get_config(module)
    config = netcfg.get_section(parents)
```
with
```
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
```
get_config returns a string, not an object in 2.3.

* Removed non-functioning get_object method in CustomNetworkConfig in favor of the
inherited method.

Added child_objs property so that expand_selection would work.  The original
verion never worked correctly as it compared NetworkConfig obj's and str's.

* Removed ShellError method in favor or new load_config method.

* Removed ShellError method in favor or new load_config method.
fixes #20260

* nxos requires a "no" statement to change mcase group.  Corrected.
Corrected changed logic.

* Corrected deleted CustomNetworkConfig import
8 years ago
Nathaniel Case e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
8 years ago
Ganesh Nalawade 89752cc34f Make logging consistent for network platforms (#23605) 8 years ago
Abhijeet 89fc098488 Update package installation warning (#23641)
Github_release requires github3.py==1.0.0a4, update warning
for the same.

Fixes https://github.com/ansible/ansible/issues/23626

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Andreas Olsson 40f9f98f7c Fix documented defaults in the nsupdate module (#23532)
Let the documentation reflect what the module actually implements.
8 years ago
Manuel Sousa 8b4f5ba064 Fix #23338 - rabbitmq_queue message ttl can't be 0 (#23448) 8 years ago
Peter Sprygada c2370f14dd fixes issue where network modules would ignore provider host value (#23589)
This addresses a problem where the action plugin would ignore the
remote_addr value for the host.  In this case, only the inventory values
for the hostname would be considered and populate the remote host
remote_addr value for the connection plugin.
8 years ago
Brian Coca 313591f8b8 removed debug print 8 years ago
Bradley Phipps abf5d6e682 eu-west-1a is an availability zone, not a region. (#23557) 8 years ago
Dag Wieers 246c84b92a Windows: Get rid of Set-Attr in remaining modules (#23525)
Only a few more modules were using Set-Attr on the $result object rather
than using a normal hashtable. This PR changes the PSObject to a
hashtable and gets rid of Set-Attr.
8 years ago
Łukasz Kostka 94bd647bc0 Fix alarm action comparison (#23523)
This fixes issue when list from module contains more than one element.
Ansible and/or boto may put same elements in list in different order,
thus resulting task as changed.

Fixes #3310
8 years ago
claer 811eb66703 Improve Fortios IPv4 policy with logging capabilities and use the backup_filename param (#23544)
* Improve Fortios IPv4 policy with logging capabilities. While there, fix typos in examples. forti_config: use the backup_filename param and dont enforce the the filename value.

* forti-typos

* Add version_added for new options in the documentation
8 years ago
John R Barker 92a425a532 Make it easier to find network modules (#23576)
* Make it easier to find network modules

Feedback has been it's difficult (via Google or directly) to find
modules as some people search for the company name vs product name,
therefore specify both.

* "IOS XR" (not "IOS-XR")
8 years ago
John R Barker 2bb25d031b network_cli modules don't always return stdout or stdout_lines (#23573)
It's possible that if the module has a low-level failure, such as
"unable to open shell", or something else in the action plugin that
stdout and stdout_lines will not be returned.

Update the documentation to clarify this point.
8 years ago
Brian Coca 952e842720 less code 8 years ago
Matt Parkes f0f20d8a1c ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
8 years ago
Brian Coca 5b7e8a7bd6 centralize ansible_managed and other template vars
now template lookup supports these again.
8 years ago
Brian Coca f7566ef1f1 removed extra 'changed' from debug output 8 years ago
Senthil Kumar Ganesan c86feeaed9 Error string:Regular expression updates (#23426) 8 years ago
Brian Coca df5895e585 fix environment validation, make setup exception
removed bare vars
now environment inheritance correclty prepends
this allows more local to override more general

fixes #23180
8 years ago
Patrick Marques 731fc288fa fixes #4441 passing subnet_name parameter (#18920) 8 years ago
John R Barker 902bc58509 [WIP] Network return docs (#23441)
Network return docs
8 years ago
Jamie Lennox 92dc61e869 Allow modifying security groups in os_server (#23207)
When the security groups specified to the os_server module change they
should be updated on the server. This will require shade 1.19 where the
server security group commands were added.

Fixes: #23206
8 years ago
Colin Nolan 57c67f0c08 Add checks to confirm that the output from `xfs_info` has the expected format. 8 years ago
Abhijeet Kasurde ba3295dd3f Pylint fixes for yum module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Abhijeet Kasurde db6d818865 Fix atomic pylint issues
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
8 years ago
Sloane Hertel 2f64e2c7fb [cloud] ec2_asg: check autoscaling group for tags before trying to use them - partially fixes #23234 (#23259)
* check autoscaling group for tags before trying to use them

* Add warning

fix comparison
8 years ago
Sloane Hertel 5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
8 years ago
Ritesh Khadgaray 40d888922b stat: better documentation
- md5 fails if the file is not a regular file ( symlink, dir,..)
8 years ago
Albert Casademont 54316f7da0 Fix Postgres user module always reporting changes (#23488) 8 years ago
Hao Wang 3b5dd4e0a0 file module doesn't create hard link to given target directory 8 years ago
Toshio Kuratomi b4f976e9b9 When apt errors, include it's exit code
We invoke /usr/bin/apt inside of the ansible module.  When that command
exits, it doesn't always include a helpful error message.  Include the
exit code so that user's have all the information we can gice them as to
why apt failed.

Addresses #19128
8 years ago
Luis Rueda 753d30b64d Rebase using latest devel branch in order to fix conflicts (#23199) 8 years ago
Ken Celenza 83a6d90899 Update Banner Doc (#23412)
I think most people's banner will come from an external file. Show an example, and clarify there is no extra lines allowed.
8 years ago
Khachatur Nazaretyan e8f1747a88 Adds attached volumes to instance facts (#23132)
* Adds attached volumes to instance facts

* Fixed identation and modified coding style

* includes revisions after maintainers review

* Coding style modified

* simplifies getting items from dict
8 years ago
Indrajit Raychaudhuri 971187e54c pacman: Fix package matching pattern in upgraded package list (#23433)
(cherry picked from commit 9a850db605)
8 years ago
Dmitry Sobolev 1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
8 years ago
Dag Wieers a075c56dbf vmware_guest_facts: Add delegate_to directive to example (#22931)
Without it, this is not going to do what most people expect.

This fixes #22840
8 years ago
Lucas Alvares Gomes cee8cc2a52 rpm_key: Decode bytes to string to work with Python 3 (Fixes #20326) (#20385)
* rpm_key: Decode bytes to string to work with Python 3 (#20326)

The read() method will return bytes we need to then decode() those bytes
to a string before trying to match() it using the re module.

* Make the rpm_key pgp regex more robust on both py2 and py3
8 years ago
Nathaniel Case 86c714548f Redo #23418 (#23425)
* Check for provider values inside check_args of respective network code

* Partial revert of b9ee5aa

The no_log change is okay, but take out the action result munging
8 years ago
Karl Bergström c7860d4d4b Open unarchive file in binary mode
Recent Python3 versions require open() to specify binary mode if the data is anything other than text.

Python3: Use int() instead of long() in unarchive

Changes long() to int() for CRC values in the unarchive module. Affects unarchiving of zip files. Since CRC values in zipfile are 32 bits the behaviour should be unchanged even in Python 2.
8 years ago
Paul Montero 1963e506ec Open file in binary mode for python3 8 years ago
Toshio Kuratomi 2fdb8e7f90 Fix a traceback with python3 and diff output
When retrieving file contents for diffing we need to get the contents as
binary.  Otherwise python3 will try to convert the file to text and fail
with non-decodable contents.

Fixes #23171
8 years ago
Chris Alfonso d4bd54d3b8 Fixes #23388 Network provider masks too much (#23418)
* Fixes #23388 Network provider masks too much

* Fix trailing whitespace
8 years ago
Dag Wieers 3648e6fd2b vmware_guest: Add delegate_to directive to examples (#22932)
Without this it is likely not going to do what people expect.
8 years ago
Brian Coca 0d5d5f2bf6 correctly get all hosts in 'all' 8 years ago
Pierre-Alexandre 283a88444f BUGFIX : using yaml hosts inventory, hosts in groups weren't added to the group 'all' 8 years ago