Commit Graph

31806 Commits (941738a68677c09773f55e3d0c6dc6feec82f9ff)
 

Author SHA1 Message Date
Nick Ball edf31f56af Linode inventory improvements: Add _meta/hostvars to inventory output. Add a 'linode' host group with all the hosts (#19329) 7 years ago
piotrkarbowski-ciklum a260d99f74 ec2_ami_copy.py: Fix WaiterError handling. (#27416)
* ec2_ami_copy.py: Fix WaiterError handling.

Change suggested by Adam Johnson at https://github.com/ansible/ansible/issues/26971

* ec2_ami_copy.py: WaiterError: fail_json: add exception parameter.

* ec2_ami_copy.py: import traceback
7 years ago
Toshio Kuratomi e992e4f436 Add missing copyright header in modules cleaned up yesterday 7 years ago
Abhijeet Kasurde 5e2184c683 Fixing broken imports and get_exception for ipa
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Brandon Davidson 3d20a2ea82 Fix typo in cloud/amazon/ec2_vpc_nacl_facts (#27534) 7 years ago
Abhijeet Kasurde be58fa979d Fix broken import in cloudformation
* Fix imports
* Add new GPLv3 Licence

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Adrian Likins ac37be9761 update roadmap (multiple vault secrets merged) (#27644) 7 years ago
Nathaniel Case 123b5e222f nxos_bgp_neighbor fixes (#27348)
* Fix `timers` idempotency

* `shutdown` is not documented as having a `default` option

* dynamic_capability is the inverse of BOOL_PARAMS
7 years ago
Adrian Likins 27a015f0ad add a 'min' type for gather_subset to collect nothing (#27085)
previously gather_subset=['!all'] would still gather the
min set of facts, and there was no way to collect no facts.

The 'min' specifier in gather_subset is equilivent to
exclude the minimal_gather_subset facts as well.

   gather_subset=['!all', '!min'] will collect no facts

This also lets explicitly added gather_subsets override excludes.

   gather_subset=['pkg_mgr', '!all', '!min'] will collect only the pkg_mgr
fact.
7 years ago
DavidVentura c85b36d220 Fix Proxmox module crashing if the hostname doesn't exist and there's no vmid (#21305)
* fail the execution instead of panicking when the hostname is not found and the vmid was not provided

* return an empty vmid list if the hostname doesn't exist
7 years ago
mharista c85f363aaa Add module cv_server_provision for integration with Arista CloudVision Portal. (#25450)
* Add module cv_server_provision for integration with Arista CloudVision Portal.

* Doc update.

* Remove shebang from test file. Update short description with company and product name.

* Update exception syntax to Python3 style.

* Remove blank line between imports.

* Remove newlines from RETURN documentation.

* Add cvprac to unittest requirements.

* Update unittest format. Add a few additional tests.

* Mock exceptions from cvprac so the library is not needed for unittests.

* Mock cvprac imports.

* Update unit tests to support python 3.5.

* Mock full cvprac library for unittests.

* Update Jinja2 import to pass updated CI checks.

* Update cvprac imports format for new CI tests.

* Add __metaclass__ and __future__.
7 years ago
Simon Dodsley 7fbd924cbb Add Pure Storage Host Group module (#26355) 7 years ago
Simon Dodsley b3865b173d Add Pure Storage Protection Groups module (#26356)
Update documentation to be correct
Change type to bool
7 years ago
jctanner baf1ed9100 [WIP] Create preserved_copy function in basic.py to perserve file ownership. (#27344)
Create preserved_copy function in basic.py to perserve file ownership.

* Add a test for template preserved backup
* Use a script to get the random names
* bytes to strings
* Remove dump of hostvars
* Stop being fancy and create a testuser instead
* Fix pep8
* set file attributes
* Pass the correct data to set_attributes_if_different
* Use -j instead -b and pass the attributes as a string instead of a list
* remove debugging message
* Use shell to softly set the attr

Fixes #24408
7 years ago
Abhijeet Kasurde b266204afa Fix JSON parsing for Python3
Fix corrects the parsing of JSON output in Python 3
environment by using to_text API.

Fixes: #26489

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
7 years ago
Nathaniel Case b93878b685 Minor cleanup to nxos_vrrp (#27593)
* Safe changes

* Fold `[0]` into `execute_show_command()`

We only ever execute one command, so only return the one response

* Streamline `results`
7 years ago
Ganesh Nalawade 94748e1728 Fix junos_command test failure (#27627)
Add a loopback interface check instead
of device specific management interface
7 years ago
Ganesh Nalawade 505f3bfcac Fix multiple issues in junos integration test (#27624) 7 years ago
John R Barker 2233d9aeb2 network-integration UserKnownHostsFile=/dev/null (#27622) 7 years ago
Ganesh Nalawade 37670b09f5 Fix junos_linkagg integration test failure (#27621)
Fixes #27574
7 years ago
Ganesh Nalawade 6e0741e8b6 Add dependency to run junos integration test (#27620) 7 years ago
Trishna Guha 9304d6cb01 fix nxos_user integration test (#27619)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
7 years ago
Abhijit Menon-Sen 20b0716948 Allow variables to be passed in to template lookup plugin (#18662)
This allows a single template to be evaluated with different values in
the same task. For example, with a template like 'x:{{a}}', one could do
something like this:

    - foo:
        a: "{{ lookup('template', 'x.j2', template_vars=dict(a=foo[item])) }}"
        b: "{{ lookup('template', 'x.j2', template_vars=dict(a=bar[item])) }}"
      with_items:
        - x
        - y

…and "a" and "b" would expand to different strings based on what we
passed in to the template lookup.
7 years ago
Sloane Hertel 517c91df18 ec2_group: add integration test for port ranges (#27112)
* fix port ranges for ec2_group and add a test to verify
7 years ago
Andrew Saraceni 435a562630 Rename win_group_member module to win_group_membership (#27614)
* rename win_group_member to win_group_membership

* adding details to BOTMETA.yml
7 years ago
Jordan Bach 24e393aef1 allow use of jinja2 variables for ec2_group from_port/to_port params (#27145) 7 years ago
James Cammarata 622ea7ca62 Change default answer in release.yml to "no" for submodules
Since releases on 2.2 and prior are few and far between, it makes more
sense to set the default to "no" for 2.3+ now.
7 years ago
Adrian Likins 2b0a7338d4 Handle win style CRLF newlines in vault text (#27590)
When parsing a vaulttext blob, use .splitlines()
instead of split(b'\n') to handle \n newlines and
windows style \r\n (CRLF) new lines.

The vaulttext enevelope at this point is just the header line
and a hexlify()'ed blob, so CRLF is a valid newline here.

Fixes #22914
7 years ago
Ricardo Carrillo Cruz 8f18ca45f1 Comment cli provider creds on junos group_vars (#27611)
We set the ansible_ssh_user and ansible_ssh_pass at the inventory level,
commenting these out to avoid precedence issue.
7 years ago
Toshio Kuratomi 7d2597a68d change the gpl header to single line version and order of imports 7 years ago
Ricardo Carrillo Cruz f8582c985a Comment the user/pass of Junos group_vars netconf provider (#27610)
We set the ansible_ssh_user and ansible_ssh_pass on the Junos
group. However, that has lower precedence than group_vars.
Commenting the group_vars so we have the creds for all Nodepool nodes
within the inventory.
7 years ago
Toshio Kuratomi 15902f2496 Fix for ansiballz filenames conflicting with python stdlib modules
The AnsiBallZ wrapper is transferred to the remote machine with
a filename similar to the Ansible-module it runs.  For modules like copy
and tempfile, this can end up conflicting with stdlib modules on the
remote machine depending on how python is setup there.  We have a little
bit of code in the wrapper to deal with this by removing the path that
the ansible module resides in from sys.path.

On MacOSX, that code was having a problem.  The path the module ends up
in included a symlinked directory so we were looking for a path in
sys.path but we had to look for the unsymlinked path instead.

Fix that by using os.path.realpath() instead of os.path.abspath()
7 years ago
Ricardo Carrillo Cruz 2de404e90a Enable log_path on network integration targets (#27608)
Logs it to /tmp/ansible-test.out
7 years ago
Adrian Likins 75a8be9a5d Add back support for vault_password_file config var (#27597)
Got removed in arg parsing updates. Now added back in
setup_vault_secrets().

The default value for DEFAULT_VAULT_PASSWORD_FILE was also
set to '~' for some reason, change to to no default.

Add integration tests.
7 years ago
Matt Davis f19ed387a7 fix non-pipelined output parsing in winrm.py (#27606)
* ensures stdout/stderr are converted to text type in py3 to avoid json serialization failures
7 years ago
Robin Roth b134352d8c WIP: Replace boilerplate (#27554)
* Replace boilerplate

* Enable test on packaging/os
7 years ago
CyberArk BizDev 6aa851c6bc CyberArk InitialSupport (#21764)
* Added cyberarkpassword lookup plugin

Added cyberarkpassword lookup plugin: It allows to retrieve credentials
(password, sshkey) from CyberArk Digital Vault

* Added Modules: cyberark_authentication & cyberark_user

Added Modules:
- cyberark_authentication: Logon/Logoff to CyberArk Vault
- cyberark_user: user management

These 2 modules use CyberArk Privileged Account Security Web Services
SDK

* Update cyberark_authentication.py

* Update cyberark_user.py

* Removed ternary conditional to comply with 2.4

* Replaced usage of iteritems() for items() to comply with python3

* PEP8 Updates

* Fixed Doc Issues

* Doc Fixes

* More Doc Fixes

* Removing cyberark_user module, and cyberark lookup plugin

for initial approval of PR, and continue with 2 different PRs after PR
#21764 is approved.

* PEP8 Fixes

* Moved cyberark modules to identity category

From IRC #ansible-devel recommendation (@bcoca) I moved cyberark to
identity category so the authorized maintainers can provide feedback
and move it forward.

* Updates based on community_review by bjolivot

- Updated description lines to have full stops in the documentation
section.
- changed file to use delimiter-separated words instead of camel case
- Updated AnsibleModule module_spec parameters to use
mutually_exclusive, required_if and required_together parameters to
avoid manual validation of the parameters.
- Added comments for more readability.
- Removed “required”: false as they are implicit.
- Enhanced check_mode handling.

* PEP8 Updates

* Updates based on IRC Feedback June 6

* Fixed description for token item

* Fixed Documentation RETURN string

* Fixed PEP8 W291 trailing whitespace

* Changes based on feedback from community review

* Added import to_text from ansible.module_utils._text

* Updates based on recommendation from community

* Changed Exception for Error in friendly messages in try/except blocks

* Updates based on community review (bcoca & dagwieers)

* Fixed httplib for python3 (http.client)
7 years ago
Ganesh Nalawade 6a0d9d1498 Fix junos_logging integration test failure (#27605) 7 years ago
Adrian Likins 9f57920eab Fix --ask-vault-pass prompt to match old when poss (#27602)
If we don't use more than one vault-id, and we use
--ask-vault-pass, instead of using the new vault prompt
format ('Vault password (my_vault_id): ') we use the old
one ('Vault password: ').

This avoids confusing Tower when it needs to detect an
interactive vault password prompt.

This also potentially could allow vault password prompts
to be customized per vault_id.
7 years ago
saichint 37392318a6 fix nxos_vlan and nxos_switchport issues (#27505) 7 years ago
Adrian Likins a52a4332fd Fix aruba_config flake8 failures (#27603)
* Fix aruba_config flake8 failures

* fix intefaces_file build/flake8 fail
7 years ago
Sloane Hertel d8eccdda3a [cloud] make ec2 paging() more functional and add paging to ec2_lc_facts (#27355) 7 years ago
Sloane Hertel ad2c1e1838 [cloud] ec2_customer_gateway: add routing option to allow bgp_asn to be optional (#27276)
fixes #27157

 add routing option to allow bgp_asn to be optional
7 years ago
Nathaniel Case ec8cbbf926 Fix aruba boilerplate 7 years ago
Sloane Hertel 61ebb89fe3 improve cloudformation failures (#27427) 7 years ago
jhawkesworth a43af128cf Add mac address to windows facts (#25803) 7 years ago
Roman Belyakovsky 42039cd436 New module: manage debian network interfaces file /etc/network/interfaces (system/interfaces_file) (#25295)
* Added new module interfaces_file

* interfaces_file: added unit tests

* interfaces_file: added golden files for unit tests

* interfaces_file: moved to system modules

* interfaces_file: fixed code formatting and convention issues
7 years ago
Brandon Davidson 4ec8744b8b Ignore main route table association when determining which associations to remove. (#23781)
They can't be removed anyway, and will just throw an error if you try to disassociate them.
7 years ago
Jens Carl cc72dead45 New module: Add module to collect facts for Amazon Redshift Cluster (cloud/amazon/redshift_facts) (#22615)
* New module redshift_facts

Gather facts about aws Redshift cluster(s).

* Fix she-bang, PEP8 violations, and ansible metadata.

* Bump version_added to "2.4"

* Fix some typos and add supporting check mode

* Fix type of RETURN fields

Fix type of RETURN fields number_of_nodes and
automated_snapshot_retention_period from integer to int.

* Add traceback information to fail_json()
7 years ago
Nathaniel Case c017d0c7c0 Fix fortios & netscaler boilerplate
Sorry
7 years ago