Commit Graph

15631 Commits (1ea67950e16f33033bf8baeaa10574e34da7f4ce)

Author SHA1 Message Date
Trishna Guha 1ea67950e1 Add eos_user module to users parameter (#23847) (#23849)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 8ec4882ba0)
9 years ago
Ganesh Nalawade 0d2d9f897c Add doc for display argument of junos_command (#23804)
(cherry picked from commit 01afe12cba)
9 years ago
Matt Davis a021b4bd8b template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
(cherry picked from commit 02ed223d49)
9 years ago
Brian Coca c05aa93739 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

(cherry picked from commit eb887b8062)
9 years ago
Brian Coca 62811bf134 also skip polling when async failed
(cherry picked from commit 94f0a4edd5dad15f720ec087f04f20bcbef1b97b)
9 years ago
Brian Coca 68fff4a4b5 script fails on async
(cherry picked from commit fe9af903f3)
9 years ago
Brian Coca 4567527249 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

(cherry picked from commit 602a2bca1b)
9 years ago
Brian Coca 1fdeef511c finer grained failed/skipped on async for actions
fixes #23729

(cherry picked from commit 3965689328)
9 years ago
Brian Coca bc990004e1 fix hashing when path is symlink
(cherry picked from commit 631a10745d)
9 years ago
Nathaniel Case c9b0026cd0 Eos port default values (#23829)
* Hook port back up for eos cli transport

* The default values have moved

* Why not have conditional defaults?
9 years ago
Nathaniel Case 0609b9ded0 EOS default transport (#23824)
* Give a default to eos transport
9 years ago
Logan Attwood d74509a235 Use isfile check on package manager paths
(cherry picked from commit 5bbf0d9cb6)
9 years ago
Trishna Guha cc59d89538 Add eos_banner as module to banner param (#23789) (#23798)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit b2129a7d3a)
9 years ago
John R Barker b7ba7d40ae Show UUID instead of name when using UUID to select snapshot (#23787) (#23794)
(cherry picked from commit 504a768636)
9 years ago
John R Barker 0347dcda05 Minor typo in vmware_guest_facts (#23791) (#23793)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit cc745b0224)
9 years ago
Ricardo Carrillo Cruz 79492a9d2d Check for proper response key on eos_banner map_config_to_obj (#23399)
If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!
(cherry picked from commit ba7ba7adc3)
9 years ago
Timo Benk b9ee0c5477 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
(cherry picked from commit 79943b86a1)
9 years ago
Bart van Bragt 898650d6bc Remove whitespace from unix group names
(cherry picked from commit d0e3d75381)
9 years ago
John R Barker 27073dd9bd Fix for setting values using gconftool-2 (#23713) (#23740)
Miscallenous fixes added to make gconftool-2 work.

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

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 27f776f97d)
9 years ago
Ganesh Nalawade c92765e26e Make warning logs consistent (#23666) (#23716)
* 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

(cherry picked from commit bf1a543f06)
9 years ago
Ganesh Nalawade db738e0a2d Remove Warning for provider (#23652) (#23714)
(cherry picked from commit b8507b676b)
9 years ago
Adrian Likins 32be9a9273 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

(cherry picked from commit ae3d7fb29e)
9 years ago
Matt Martz 8e1b422e4a When become_method is su, self._play_context.prompt is a function. Fixes #23689
(cherry picked from commit f82d95ae28)
9 years ago
Nathaniel Case 82dcaa725f pep8 fix for Shippable 9 years ago
Brian Coca 7cd2b8d7a0 tolerate 'batch' systems that mess with stdin (#23596)
* tolerate 'batch' systems taht mess with stdin

fixes #23541

* have pause on windows tolerate devnull

* tuplie

(cherry picked from commit 586fcae398)
9 years ago
Nathaniel Case c4b6b87344 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
(cherry picked from commit 0b4cebfb8b)
9 years ago
Daniel f66852f1ef 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
9 years ago
Nathaniel Case d1d0f382a2 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
(cherry picked from commit e518b6f5b4)
9 years ago
Ganesh Nalawade 39c2e4c28b Make logging consistent for network platforms (#23605) (#23648)
(cherry picked from commit 89752cc34f)
9 years ago
John R Barker b721fa2ef5 Fix documented defaults in the nsupdate module (#23532) (#23637)
Let the documentation reflect what the module actually implements.
(cherry picked from commit 40f9f98f7c)
9 years ago
Manuel Sousa b8400cd897 Fix #23338 - rabbitmq_queue message ttl can't be 0 (#23448)
(cherry picked from commit 8b4f5ba064)
9 years ago
Ganesh Nalawade 8b5267f09f fixes issue where network modules would ignore provider host value (#23589) (#23608)
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.
(cherry picked from commit c2370f14dd)
9 years ago
Brian Coca c9de302fc6 removed debug print
(cherry picked from commit 313591f8b8)
9 years ago
John R Barker 85fa2a9dd4 Make it easier to find network modules (#23576) (#23584)
* 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")

(cherry picked from commit 92a425a532)
9 years ago
John R Barker 5865356e92 network_cli modules don't always return stdout or stdout_lines (#23573) (#23582)
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.
(cherry picked from commit 2bb25d031b)
9 years ago
John R Barker bc43de7b21 Error string:Regular expression updates (#23426) (#23569)
(cherry picked from commit c86feeaed9)
9 years ago
John R Barker a574dc7bf1 [WIP] Network return docs (#23441) (#23535)
Network return docs
(cherry picked from commit 902bc58509)
9 years ago
Colin Nolan c5fcae130f Add checks to confirm that the output from `xfs_info` has the expected format.
(cherry picked from commit 57c67f0c08)
9 years ago
Matt Clay 84d5e6e645 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.

(cherry picked from commit 48eeab8a53)
9 years ago
Albert Casademont 1a30df265d Fix Postgres user module always reporting changes (#23488)
(cherry picked from commit 54316f7da0)
9 years ago
Toshio Kuratomi ee69fd140b 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

(cherry picked from commit b4f976e9b9)
9 years ago
Lucas Alvares Gomes 5f53a159a0 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

(cherry picked from commit cee8cc2a52)
9 years ago
Karl Bergström 561d424a0e 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.
9 years ago
Paul Montero ba977b7cd7 Open file in binary mode for python3
(cherry picked from commit 1963e506ec)
9 years ago
Toshio Kuratomi 53b19611e1 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

(cherry picked from commit 2fdb8e7f90)
9 years ago
Ganesh Nalawade b8d6f23fb7 Fix a10 pylint issues (#23410) (#23413)
* Fix a10 pylint issues
* Moving imports to standard location

(cherry picked from commit 3934513121)
9 years ago
Matt Martz bdf46e928f Fallback to old ssl_wrap_socket
(cherry picked from commit 13ac993d25)
9 years ago
Matt Martz 71e8c841ce Use PyOpenSSLContext instead of deprecated wrap_ssl_context from urllib3.contrib.pyopenssl. Fixes #18528
(cherry picked from commit 33f7a27cba)
9 years ago
Strahinja Kustudić 701a47c850 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.

(cherry picked from commit 9f0be5a556)
9 years ago
Matt Parkes ffde769567 ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
9 years ago