Commit Graph

27583 Commits (1653a77f1da7bdef604ce81ac40806e10a07943e)
 

Author SHA1 Message Date
Adrian Likins 1653a77f1d add unit tests for playbook/included_file.py (#18710) 8 years ago
Adrian Likins 08a5d506bb Fix errors on 'ansible-playbook --flush-cache' (#18754)
Add a unit test, and split out the flush cache logic to
it's own method.
Fixes #18708
8 years ago
Adrian Likins 6c4f554f5a Provide slightly better msg on fact cache error (#18759)
If the configured fact_cache plugin (fact_caching config)
fails, raise a fatal error instead of failing mysteriously
later.

Fixes #18751
8 years ago
Adrian Likins 2979488b08 Allow sphinx to use multiple cpus w -j support (#18900)
'CPUS=6 make webdocs' for example
8 years ago
Carlos E. Garcia 0b8011436d minor spelling changes 8 years ago
Michael Scherer 054a3fccf8 Cleanup import for sysctl module 8 years ago
Michael Scherer f9460f3c80 Use type='path' instead of 'str' for deploy_helper 8 years ago
Michael Scherer db8719cf8b Add support for NetBSD
While I only checked on NetBSD 7.0, it seems to use the same
rc system as FreeBSD so it should be working for now.
8 years ago
Michael Scherer 6ffd494efb Cleanup imports for user
Some class use shutil, who was not imported, and we want to
avoid '*' for future refactoring.
8 years ago
Lumír 'Frenzy' Balhar 84544ee8fd Fix AST nodes for Python 3 and enable dependent test_uri (#18597)
* Enable tests on python 3 for uri

* Added one more node type to SAFE_NODES into safe_eval module.

ast.USub represents unary operators. This is necessary for
parsing some unusual but still valid JSON files during testing
with Python 3.
8 years ago
John R Barker b915e790d3 veos-dut-01 is down, so use veos01 (#19299) 8 years ago
Ondra Machacek 95ef9fd9f9 cloud: ovirt: Add ovirt_tags and ovirt_tags_facts modules (#19295) 8 years ago
Toshio Kuratomi 51491c9904 Remove itervalues (not available on py3) 8 years ago
Toshio Kuratomi a8af6c6baf Fix some SSL errors in mail.py causing SMTP Syntax Errors (Rebase of https://github.com/ansible/ansible-modules-extras/pull/708 ) (#19253)
* Rebase of https://github.com/ansible/ansible-modules-extras/pull/708

708 was full of extraneous merge commits interwoven with commits to
implement the feature. In the end the only way I could clean this up
in reasonable time was to just take a regular diff between the PR and
the base.  This lost the history of intermediate commits but I've
preserved attribution to @dayton967 via git's --author field.

Although I preserved the logic of the PR, there were a few additional
things that I cleaned up:

* Fixed import of email.mime.multipart
* Used the argspec to set port and timeout to integers instead of having
  ad hoc code inside of the module.
* Used argspec's choices for secure instead of ad hoc code inside of the
  module.
* Removed some unused variables
* Made secure_state a python boolean instead of using 0 and 1
* Used secure with string comparisons instead of turning it into an
  integer code.  This is much more readable.
* Fixed catching of SMTPExceptions (SMTPException wasn't imported
  directly so it needed to use the smtplib namespace.)
8 years ago
John R Barker bdc4fa6b99 Add group_vars/ops.yaml (#19288)
Authentication details for ops modules. Was missed during porting
8 years ago
René Moser a28d898c29 cloudstack: cs_securitygroup_rule: fix impossible to set icmp_code and icmp_type to 0 (#19258) 8 years ago
Andrea Tartaglia ef391a11ec Removed dict.iteritems() in modules. (#18859)
This is for py3 compatibility, addressed in #18506
8 years ago
Vlad Glagolev 4b27d08643 dropped 'BOOLEANS' choices, converted env vars to str 8 years ago
Robin Roth 5bf07454cb Test apache2 force (#18500)
* Use native yaml for apache2 test

* Test removal of default modules with force

a2enmod on debian has `-f`, but not on SUSE (runs there without force).
Therefore don't test that option on SUSE.
The docs already specify that the option is intended for Debian systems
only.
8 years ago
Clark Boylan a65e34ce77 Fix synchronize retries (#18535)
* Fix synchronize retries

The synchronize module munges its task args on every invocation of
run(). This was problematic because the munged data was not fit for use
by a second pass of the synchronize module. Correct this by using a copy
of the task args on every invocation of run() so that the original args
are not affected.

Local testing using this playbook seems to confirm that things work as
expected:

  - hosts: all
  tasks:
    - delay: 2
      register: task_result
      retries: 1
      until: task_result.rc == 0
      synchronize:
        dest: /tmp/out
        mode: pull
        src: /tmp/nonexistent/

fixes #18281

* Update synchroncization fixture assertions

When we started operating on a copy of the task args the test assertions
were no longer asserting things about the munged state but of the
pristine state. Convert the copy of task args to a class member so that
it can be compared against later in testing and update the assertions to
check this munged copy.
* Shuffle objects around for cleaner testing

Attach the temporary args dict to the task rather than the action as
this makes updating the existing tests cleaner.
8 years ago
ikelos 9e5d4de49a Fix overwrite parameter in module_utils.junos (#18671)
The overwrite parameter is forcibly set to false, meaning a module
passing that parameter will have no effect.  The overwrite facility
is necessary to ensure that conflicting options can be written the
configuration (which, in replace mode, they cannot).

This change ensures that if overwrite is set, it will not be changed
to False in the logic.
8 years ago
Patrick Ogenstad 05e5474c52 Disable CLI errors when typing enable (#18531) 8 years ago
Juan Antonio Valiño García 40ddbe026d Fixes #18663. Bad handling of existing config in dellos9 module. (#18664)
* Fixes #18663. Bad handling of existing config in dellos9 module.

The dellos9 module doesn't build correctly the internal
structures used to represent the existing config of the managed
network device. This leads to apply changes every time the
playbook is run, even if the existing config is the same that the
one you are trying to push into the device.

Probably this problem exist also in the dellos6 and dellos10
modules, but I only fixed it in the dellos9 module.

The fix modifies two methods. The first one is `get_config`,
where the return clause didn't work correctly when the flow
doesn't enter in the `if` block. In that case the `contents`
variable is not an array an this should be handled.

The second fix is in the `get_sublevel_config` method. In this
case the indentation whitespaces of the parents should be rebuild
because further functions and methods required it to handle
correctly comparisons used to check if changes should be pushed
into device.

* Fixes #18663 for dellos10 module with the same patches as dellos9.
8 years ago
Matt Clay f9c4158ff8 Remove core/extras dirs from old PRs during CI. 8 years ago
Matt Clay 43785aa246 Add --all option to ansible-doc. 8 years ago
Nehal J Wani ead0022255 Open temp file only once
mkstemp() returns a tuple containing an OS-level handle to an open file
(as would be returned by os.open()) and the absolute pathname of that
file, in that order.

This patch makes sure that the fd opened by tempfile.mkstemp() is
re-used and closed properly.
8 years ago
John R Barker 39af9b5a86 Make it clearer where the network tests live (#19242) 8 years ago
Dylan Silva cf83a235d5 Updated for 2.4 Roadmap
- Added in 2.4 roadmap page
- Updated top-level Roadmap to reflect new page
8 years ago
Fabio Alessandro Locati 470d1e3aea Remove unused quotes (#19207) 8 years ago
Fabio Alessandro Locati 4b9a65fd7c Improve quotes - notification/hall.py (#19166) 8 years ago
Fabio Alessandro Locati 64e4c2798c Improve quotes - notification/nexmo.py (#19168) 8 years ago
Fabio Alessandro Locati 5e9b763937 Remove useless quotes - notification/sns.py (#19169) 8 years ago
Fabio Alessandro Locati 3d15f622b0 Always run on localhost - notification/rocketchat.py (#19170) 8 years ago
Fabio Alessandro Locati cf5424e165 Remove useless quotes - monitoring/statusio_maintenance.py (#19173) 8 years ago
Kevin Burke 114e3cb7a4 Fix typos in git.py (#19186) 8 years ago
Evan Kaufman aaf13e07fe Handle byte/string conversion on read/write with text module_utils (#19188)
Fixes ansible/ansible-modules-core#5840, moved from ansible/ansible-modules-core#5847
8 years ago
Brian Coca 7a07a594f7 reword
(cherry picked from commit 72d6e7ef2ba59ec7b905f2438d27975f43ccfde5)
8 years ago
Brian Coca 76816c6fec added packing faq entry
(cherry picked from commit 02183a10feb255c692e5a5c1d9a6b77b1afe6344)
8 years ago
Vlad Glagolev 45b2f4b479 Source Mage GNU/Linux package manager support (#19072)
* added alpha version of the 'sorcery' module

* fully conforming YAML

* use bundled check for executables

* - codex_list(): use commands instead of checksums to get sorcery version and verify codex equality - renamed: - manage_depends() -> match_depends() - tocast -> cast_queue, todispel -> dispel_queue, needs_recast -> depends_ok - SORCERY_LOG -> SORCERY_LOG_DIR, SORCERY_STATE -> SORCERY_STATE_DIR - removed: - SORCERY_VERSION_FILE - CODEX - added commentary to match_depends() and manage_spells() - fixed bug about dropped dependency line for previously existed dependency - fixed bug about not fixing depends for the 'latest' state - simplified several code constructions

* cleaned up some docs

* do not use separate message for Codex update, rely on the 'changed' status instead

* use built-in list conversion (_check_type_list()) for spells

* corrected spell name extraction from list in match_depends()

* avoid non-matching dependencies line duplication in depends file

* added more complex playbook example

* tiny stylistic fix for docs

* replaced ternary construction with a regular statement

* replaced yet another ternary construction with a regular statement

* enable Python 2.4 compatibility by splitting try-finally block

* enable Python 2.4 compatibility by replacing 'with' statement with try-except+try-finally blocks

* unify spells' assign

* replaced one regex with startswith()

* go Ansible 2.1

* added dummy RETURN template

* go Ansible 2.2

* better clarify permissions' requirements

* - updated copyright years - fixed rebuild command bug - re-used run_command_environ_update dict for env var management

* handle Python 3.5

* Revert "handle Python 3.5"

This reverts commit 33a5a0eb64c1193318298e111f063cdd5f93b73a.

* handle Python 3.5 (2nd try)

* go Ansible 2.3

* clarity++
8 years ago
Fabio Alessandro Locati 9a9ee3a195 Improve YAML (#19174) 8 years ago
Fabio Alessandro Locati 4bfb83c966 Native YAML - notification/mqtt.py (#19164) 8 years ago
Alexandre Garnier 0f7abad38f Fix python 2.4 compatibility
`start` keyword of `enumerate` is only available since python 2.6
8 years ago
Chris Houseknecht 65491cc839 For docker add --blocking-io only when missing (#19171) 8 years ago
Irina Muchnik 9f58e69d63 Fix secure temp file creation (#19096)
* For realz this time

* Fix tempfile.mkstemp (#2)

* back to square one, removing temp file from the mix

* Adding temp back

* Adding tuple  back

* Adding another tuple back

* Trying to get around weird Jenkins behavior of blowing up when both .hpi and jpi file found

* Incorporating PR feedback

* Delete .hpi file instead of backing it up, some basic clean up

* Moving file deletion to the right location

* Blank lines. They always get me.
8 years ago
Fabio Alessandro Locati 2adde7a6d1 Remove unused quotes - notification/pushbullet.py (#19149) 8 years ago
Fabio Alessandro Locati c3887138c5 Remove unused quotes (#19150) 8 years ago
Fabio Alessandro Locati 261fad8fee Remove unused quotes - notification/hipchat.py (#19151) 8 years ago
Fabio Alessandro Locati 617e82fe8c Remove unused quotes - notification/twilio.py (#19152) 8 years ago
Fabio Alessandro Locati e788f13956 Remove unused quotes - files/unarchive.py (#19155) 8 years ago
Fabio Alessandro Locati 90a698c367 Remove unused quotes - notification/rocketchat.py (#19156) 8 years ago