Commit graph

15823 commits

Author SHA1 Message Date
Kai
cb13aea88b Fix systemd in chroot (#23904)
* Fix systemd in chroot

The 'request ignored' message is in stderr, not stdout.

* Check both stdout and stderr for systemd message

Some versions of systemd report to stderr, others to stdout. Also check
whether output could be a valid normal response to avoid false positives.
2017-04-24 19:53:12 -04:00
Sloane Hertel
d021d8f16b efs: include name in results (#23931) 2017-04-24 17:49:14 -04:00
Sloane Hertel
380ac577c6 [cloud] ec2_facts: make ec2_facts python3 compatible - fixes #23595 (#23872)
* make ec2_facts python3 compatible

* remove parentheses and use pop() instead of del
2017-04-24 16:09:46 -04:00
Brian Coca
a108f0fcd3 avoid hosts 'pre templated warnings' (#23878)
* avoid hosts 'pre templated warnings'

fixed is_template failing on undefined
fixes #23057

* py3 compat
2017-04-24 15:19:52 -04:00
Adrian Likins
e0a7105c2d Use sys.stdout.buffer to write vault bytes to stdout on py3 (#23760)
* Use sys.stdout.buffer to write vault bytes to stdout on py3

We need sys.stdout.buffer on py3 so we can write bytes to it since the plaintext
of the vaulted object could be anything/binary/etc

Before, attempting to write bytes to stdout on py3 would cause:

  TypeError: write() argument must be str, not bytes
2017-04-24 10:09:03 -04:00
Ondra Machacek
80327d9d47 cloud: ovirt: import VM from external source (#22450) 2017-04-24 08:59:35 -04:00
Sloane Hertel
00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 2017-04-23 09:19:22 +02:00
Brian Coca
35e03cb140 p8p 2017-04-21 23:36:44 -04:00
Brian Coca
27185f44b0 fix environment populated detection
fixes #23764
2017-04-21 18:21:01 -04:00
Ondra Machacek
13c2c292f2 cloud: ovirt: add note that modules works with RHV as well (#23808) 2017-04-22 00:20:24 +02:00
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
2017-04-21 16:07:38 -04:00
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
2017-04-21 11:48:45 -07:00
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
2017-04-21 15:30:23 +02:00
Ganesh Nalawade
04ae977f39 Fix display argument defualt value (#23859) 2017-04-21 18:58:38 +05:30
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
2017-04-21 07:40:47 -04:00
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
2017-04-21 10:41:50 +02:00
Trishna Guha
8ec4882ba0 Add eos_user module to users parameter (#23847)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-21 13:22:59 +05:30
Ganesh Nalawade
01afe12cba Add doc for display argument of junos_command (#23804) 2017-04-21 02:31:51 -04:00
Matt Davis
02ed223d49 template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
2017-04-20 20:33:48 -07:00
Brian Coca
79b9c585ea less code
(cherry picked from commit 20d9f79a5250e764ffeddb046aeb82b7824ed952)
2017-04-20 22:05:55 -04:00
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
2017-04-20 18:03:03 -04:00
Abhijeet Kasurde
527a7762e1 Use regex variable in eos_user.py (#23797)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 17:04:09 -04:00
Sloane Hertel
91644167c9 improve exception handling (#23722)
make pep8
2017-04-20 16:40:37 -04:00
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
2017-04-20 16:34:43 -04:00
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?
2017-04-20 15:58:45 -04:00
Brian Coca
b4b96143fe also skip polling when async failed 2017-04-20 15:47:24 -04:00
Nathaniel Case
9bcc3f298f EOS default transport (#23824)
* Give a default to eos transport
2017-04-20 15:02:42 -04:00
Matt Babineau
4914164717 Typo (#23778)
Missed that D...
2017-04-20 10:36:09 -07:00
Brian Coca
fe9af903f3 script fails on async 2017-04-20 11:49:10 -04:00
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
2017-04-20 11:44:26 -04:00
Brian Coca
3965689328 finer grained failed/skipped on async for actions
fixes #23729
2017-04-20 10:58:50 -04:00
Logan Attwood
5bbf0d9cb6 Use isfile check on package manager paths 2017-04-20 07:42:58 -07:00
Brian Coca
631a10745d fix hashing when path is symlink 2017-04-20 10:35:59 -04:00
Trishna Guha
b2129a7d3a Add eos_banner as module to banner param (#23789)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-20 15:42:40 +05:30
Loïc Blot
504a768636 Show UUID instead of name when using UUID to select snapshot (#23787) 2017-04-20 11:11:04 +01:00
Abhijeet
cc745b0224 Minor typo in vmware_guest_facts (#23791)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 11:04:03 +01:00
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
2017-04-19 14:15:20 -04:00
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.
2017-04-19 10:24:42 -07:00
Bart van Bragt
d0e3d75381 Remove whitespace from unix group names 2017-04-19 09:42:00 -07:00
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>
2017-04-19 14:20:21 +01:00
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
2017-04-18 16:49:10 -04:00
Brian Coca
3f62dfda92 nicer docs 2017-04-18 13:13:14 -04:00
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
2017-04-18 13:09:02 -04:00
Matt Martz
f82d95ae28 When become_method is su, self._play_context.prompt is a function. Fixes #23689 2017-04-18 13:01:18 -04:00
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
2017-04-18 21:59:38 +05:30
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
2017-04-18 11:49:25 -04:00
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
2017-04-18 11:39:49 -04:00
Brian Coca
1ef2b6b302 added mongodb lookup docs 2017-04-18 11:12:09 -04:00
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
2017-04-18 10:49:47 -04:00
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
2017-04-18 15:46:07 +02:00