Commit Graph

20664 Commits (a87a239124c31d1e2b48581a982d9fe7b0093669)
 

Author SHA1 Message Date
Brian Coca a87a239124 draft of return common fields
(cherry picked from commit da2da568a051d51edd8c25a4d324089f8bd616eb)
8 years ago
fallencliff 06d46a1ecc update facts.py for aix (#17539)
* update facts.py for aix

add product_serial ,lpar_info,product_name and pv/vg info into facts

10.223.219.10 | SUCCESS => {
    "ansible_facts": {
        "ansible_all_ipv4_addresses": [
            "77.77.77.1", 
            "10.223.219.10"
        ], 
        "ansible_all_ipv6_addresses": [
            "::1%1/0"
        ], 
        "ansible_architecture": "chrp", 
        "ansible_date_time": {
            "date": "2016-09-13", 
            "day": "13", 
            "epoch": "1473760269", 
            "hour": "17", 
            "iso8601": "2016-09-13T09:51:09Z", 
            "iso8601_basic": "20160913T175109568670", 
            "iso8601_basic_short": "20160913T175109", 
            "iso8601_micro": "2016-09-13T09:51:09.569251Z", 
            "minute": "51", 
            "month": "09", 
            "second": "09", 
            "time": "17:51:09", 
            "tz": "BEIST", 
            "tz_offset": "BEIST", 
            "weekday": "Tuesday", 
            "weekday_number": "2", 
            "weeknumber": "37", 
            "year": "2016"
        }, 
        "ansible_default_ipv4": {
            "address": "10.223.219.10", 
            "broadcast": "10.223.219.127", 
            "device": "en3", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "gateway": "10.223.219.1", 
            "interface": "en3", 
            "macaddress": "00:11:25:be:4b:75", 
            "mtu": "1400", 
            "netmask": "255.255.255.128", 
            "network": "10.223.219.0", 
            "type": "unknown"
        }, 
        "ansible_default_ipv6": {}, 
        "ansible_distribution": "AIX", 
        "ansible_distribution_release": "1", 
        "ansible_distribution_version": "6", 
        "ansible_dns": {}, 
        "ansible_domain": "", 
        "ansible_en0": {
            "device": "en0", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "77.77.77.1", 
                    "broadcast": "77.77.77.127", 
                    "netmask": "255.255.255.128", 
                    "network": "77.77.77.0"
                }
            ], 
            "ipv6": [], 
            "macaddress": "00:14:5e:b8:cd:a6", 
            "mtu": "1500", 
            "type": "unknown"
        }, 
        "ansible_en3": {
            "device": "en3", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "NOTRAILERS", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "CHECKSUM_OFFLOAD(ACTIVE)", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "10.223.219.10", 
                    "broadcast": "10.223.219.127", 
                    "netmask": "255.255.255.128", 
                    "network": "10.223.219.0"
                }
            ], 
            "ipv6": [], 
            "macaddress": "00:11:25:be:4b:75", 
            "mtu": "1400", 
            "type": "unknown"
        }, 
        "ansible_env": {
            "AUTHSTATE": "compat", 
            "CLCMD_PASSTHRU": "1", 
            "HOME": "/home/yd_hzj", 
            "LANG": "C", 
            "LC_ALL": "C", 
            "LC_MESSAGES": "C", 
            "LC__FASTMSG": "true", 
            "LOCPATH": "/usr/lib/nls/loc", 
            "LOGIN": "yd_hzj", 
            "LOGNAME": "yd_hzj", 
            "MAIL": "/var/spool/mail/yd_hzj", 
            "NLSPATH": "/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat", 
            "ODMDIR": "/etc/objrepos", 
            "PATH": "/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java14/jre/bin:/usr/java14/bin", 
            "PWD": "/home/yd_hzj", 
            "PYTHONPATH": "", 
            "SHELL": "/usr/bin/ksh", 
            "SSH_CLIENT": "10.223.172.41 33369 22", 
            "SSH_CONNECTION": "10.223.172.41 33369 10.223.219.10 22", 
            "SSH_TTY": "/dev/pts/12", 
            "TERM": "vt100", 
            "TZ": "BEIST-8", 
            "USER": "yd_hzj", 
            "_": "/usr/bin/python"
        }, 
        "ansible_fips": false, 
        "ansible_firmware_version": "SF240_358", 
        "ansible_fqdn": "test1", 
        "ansible_gather_subset": [
            "hardware", 
            "network", 
            "virtual"
        ], 
        "ansible_hostname": "test1", 
        "ansible_interfaces": [
            "en0", 
            "lo0", 
            "en3"
        ], 
        "ansible_kernel": "1", 
        "ansible_lo0": {
            "device": "lo0", 
            "flags": [
                "UP", 
                "BROADCAST", 
                "LOOPBACK", 
                "RUNNING", 
                "SIMPLEX", 
                "MULTICAST", 
                "GROUPRT", 
                "64BIT", 
                "LARGESEND", 
                "CHAIN"
            ], 
            "ipv4": [
                {
                    "address": "127.0.0.1", 
                    "broadcast": "127.255.255.255", 
                    "netmask": "255.0.0.0", 
                    "network": "127.0.0.0"
                }
            ], 
            "ipv6": [
                {
                    "address": "::1%1/0"
                }
            ], 
            "macaddress": "unknown", 
            "mtu": "16896", 
            "type": "unknown"
        }, 
        "ansible_lpar_info": "1 test1", 
        "ansible_machine": "00CE5FA34C00", 
        "ansible_memfree_mb": 9992, 
        "ansible_memtotal_mb": 98304, 
        "ansible_nodename": "test1", 
        "ansible_os_family": "AIX", 
        "ansible_pkg_mgr": "svr4pkg", 
        "ansible_processor": "PowerPC_POWER5", 
        "ansible_processor_cores": 2, 
        "ansible_processor_count": 12, 
        "ansible_product_name": "IBM,9119-595", 
        "ansible_product_serial": "02E5FA3", 
        "ansible_python": {
            "executable": "/usr/bin/python", 
            "has_sslcontext": false, 
            "type": "CPython", 
            "version": {
                "major": 2, 
                "micro": 5, 
                "minor": 7, 
                "releaselevel": "final", 
                "serial": 0
            }, 
            "version_info": [
                2, 
                7, 
                5, 
                "final", 
                0
            ]
        }, 
        "ansible_python_version": "2.7.5", 
        "ansible_selinux": false, 
        "ansible_service_mgr": "src", 
        "ansible_ssh_host_key_dsa_public": "AAAAE23Nzav1hVVTNNoYvp7eokKbwY", 
        "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYvp7eokKbwY=", 
        "ansible_ssh_host_key_rsa_public": "AAAAB3Nzav1hVVTNfKiM4W1j9mcw==", 
        "ansible_swapfree_mb": 16558, 
        "ansible_swaptotal_mb": 16896, 
        "ansible_system": "AIX", 
        "ansible_user_dir": "/home/yd_hzj", 
        "ansible_user_gecos": "", 
        "ansible_user_gid": 7, 
        "ansible_user_id": "yd_hzj", 
        "ansible_user_shell": "/usr/bin/ksh", 
        "ansible_user_uid": 263, 
        "ansible_userspace_bits": "32", 
        "ansible_vgs": {
            "realsyncvg": [
                {
                    "free_pps": "6", 
                    "pp_size": "128 megabyte(s)", 
                    "pv_name": "hdisk74", 
                    "pv_state": "active", 
                    "total_pps": "1999"
                }
            ], 
            "rootvg": [
                {
                    "free_pps": "0", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk0", 
                    "pv_state": "active", 
                    "total_pps": "546"
                }, 
                {
                    "free_pps": "113", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk1", 
                    "pv_state": "active", 
                    "total_pps": "546"
                }
            ], 
            "testvg": [
                {
                    "free_pps": "838", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk105", 
                    "pv_state": "active", 
                    "total_pps": "999"
                }, 
                {
                    "free_pps": "599", 
                    "pp_size": "256 megabyte(s)", 
                    "pv_name": "hdisk106", 
                    "pv_state": "active", 
                    "total_pps": "999"
                }
            ]
        }, 
        "module_setup": true
    }, 
    "changed": false
}

* Update facts.py

* Update facts.py
8 years ago
John R Barker a80158847e New networking modules in 2.2 8 years ago
Michael Scherer 968101f611 Fix #17624 (#17627)
Even if the size of the network is 0, it should have a netmask.
8 years ago
Nathaniel Case 881da2b3f1 Fix call to `axapi_call_v3()` (#17637)
Closes #17584
8 years ago
John R Barker 991bd2908c Networking status for 2.2
Now that we are at feature freeze update the status
8 years ago
René Moser 6247e7bc38 cloudstack: move common code to module_utils (#17635) 8 years ago
Justin Clift 4235bda192 Another minor typo fix ;) (#17631) 8 years ago
Justin Clift 49228d473b Minor typo fix for FreeBSD (#17633) 8 years ago
René Moser 3f6f4617dc cloudstack: fix has_changed dict values comparsion (#17632)
In some rare situations, the CloudStack API returns string for numbers
when we expected int.

With this fix, we ensure we compare the types expected.
8 years ago
Peter Sprygada ff52e01a11 Merge pull request #17625 from skg-net/dellos6_template
Added support for template module for Dell Networking OS6 devices
8 years ago
Peter Sprygada 8f8eb84ebf Merge pull request #17613 from Qalthos/pyez_check
Add simple checks for libraries to junos
8 years ago
Peter Sprygada 79d1b51dfb Merge pull request #17623 from dgjustice/nxos_fixes
Fixed transport issues when calling self.execute from Cli
8 years ago
Joshua Elsasser fa5f8a7543 Fix slaac filter (#17551) 8 years ago
cinerama70 02cec7dca9 Add os_family to test_distribution_version (#17620)
As suggested in feedback on
https://github.com/ansible/ansible/pull/17575, add
os_family to test_distribution_version. Add the
correct os_family to the existing testcase data
entries.

Also add os_family to the output of
gen_distribution_version_testcase.py so any new
generated entries will contain this data.
8 years ago
d3justi 261666a01b Removed checks from Nxapi class. D\'oh\! 8 years ago
d3justi 07f3b27351 added a couple more checks 8 years ago
Senthil Kumar Ganesan 463349c0d1 Added support template module for Dell Networking OS6 devices 8 years ago
d3justi d34f7c24d9 Fixed transport issues when calling self.execute from Cli 8 years ago
Senthil Kumar Ganesan e07b854505 Update Changelog for the dellos6_facts module support (#17621) 8 years ago
Toshio Kuratomi 2989527cd9 Fix dataloader using deprecated version of is_encrypted (#17615) 8 years ago
Peter Sprygada 6826ed3879 Merge pull request #17622 from privateip/network-plugin-fix
fixes AttributeError: 'Task' object has no attribute '_block'
8 years ago
Peter Sprygada 353f6be273 Merge pull request #17545 from privateip/asa
removes filter attribute from asa
8 years ago
Peter Sprygada 2a7c87a3b7 fixes AttributeError: 'Task' object has no attribute '_block'
This addresses a problem when *_config or *_template network modules are
being used in roles.  The module will error with the above message.  This
fixes that problem

fixed ansible/ansible-modules-core#4840
8 years ago
Matt Clay 07a76bece1 Update submodule refs. 8 years ago
Toshio Kuratomi ce4c0fd644 Use text strings when using display() to avoid UnicodeError tracebacks 8 years ago
Steve Gargan a06da86d52 update consul tests to reflect fixes to the core and session modules (#17451) 8 years ago
Senthil Kumar Ganesan bb9ed50441 Renamed the Modules from dnos* -> dellos*, updated copyright, removed… (#17617)
* Renamed the Modules from dnos* -> dellos*, updated copyright, removed dnos6_template

* Addressed @gundalow comments
8 years ago
ftigeot 9df8a2565f Fix distribution fact on DragonFly (#17619)
* By default, ansible_distribution is not set on DragonFly systems,
  preventing some distribution-specific tests from being written

* This commit fixes the issue by returning the quite logical value
  of "DragonFly" when appropriate
8 years ago
jctanner 66426dcd38 vmware_inventory: decode strings to ascii if not alphanumeric (#17618)
Fixes #17281
8 years ago
Toshio Kuratomi 794c1636eb Add note to explain inline comments can only begin with ; (#17607)
Fixes #16151
8 years ago
nvigot 10f840e80d include_vars now properly deals with hash_behaviour (#15895) 8 years ago
Adrian Likins 3e754086b6 Fix error using jsonfile with incomplete config (#17567)
If 'fact_caching=jsonfile' was configured, but
'fact_caching_connection' was not configured, jsonfile
would fail and ansible-playbook would exit with a traceback.

Fixes #17566
8 years ago
jctanner 29fda4be1e copy action plugin: recurse into sub folders of the source (#17614)
* copy action plugin: recurse into sub folders of the source

Fixes #13013

* Fix python3 bytes/strings

* Fix py3 again

* test
8 years ago
Brian Coca 4e60f23198 remove bare variable support from loops (#17519)
* remove bare variable support from loops

* Added new 'removed deprecated' section to changelg

also added removed items from this PR and others
8 years ago
Toshio Kuratomi d9c0773609 Update submodule refs 8 years ago
Nathaniel Case b753e8dc48 Add simple checks for libraries to junos 8 years ago
Andrea Tartaglia e0a77bb8d5 Pass the absolute path to dirname when assigning basedir (#17457)
* Pass the absolute path to dirname when assigning basedir

If no path is specified when calling the playbook, os.path.dirname(playbook_path) returns ''
This will cause failure when creating the retry file.

Fixes #17456

* Updated to use os.pathdirname(os.path.abspath())
8 years ago
Mike Rostermund 89c826df9d Fixed typo in changelog (#17597) 8 years ago
Tom Melendez 91a30e59e4 Changes to enable make gce to run. Added sys import so libcloud error is displayed; renamed credentials keys in template file so they work properly with gce_credentials.py. (#16607) 8 years ago
Peter Sprygada 697888965e Merge pull request #17603 from skg-net/dnos10_facts
Added support for facts module for Dell Networking OS10 device.
8 years ago
Toshio Kuratomi 8af8eec789 Merge pull request #17590 from abadger/vault-fixes
Vault fixes
8 years ago
Senthil Kumar Ganesan 769fa1c2d7 Support for dnos10_facts module 8 years ago
Matt Clay 355b29573c Use default on undefined vars in tests. (#17601) 8 years ago
Toshio Kuratomi e70066a6f7 Many Cleanups to vault
* Make is_encrypted_file handle both files opened in text and binary mode
  On python3, by default files are opened in text mode.  Since we know
  the encoding of vault files (and especially the header which is the
  first set of bytes) we can decide whether the file is an encrypted
  vault file in either case.
* Fix is_encrypted_file not resetting the file position
* Update is_encrypted_file to check that all the data in the file is ascii
* For is_encrypted_file(), add start_pos and count parameters
  This allows callers to specify reading vaulttext from the middle of
  a file if necessary.
* Combine VaultLib.encrypt() and VaultLib.encrypt_bytestring()
* Change vault's is_encrypted() to take either text or byte strings and to return False if any part of the data is non-ascii.
* Remove unnecessary use of six.b
* Vault Cipher: mark a few methods as private.
* VaultAES256._is_equal throws a TypeError if given non byte strings
* Make VaultAES256 methods that don't need self staticmethods and classmethods
* Mark VaultAES and is_encrypted as deprecated
* Get rid of VaultFile (unused and feature implemented in a different way)
* Normalize variable and parameter names on plaintext, ciphertext, vaulttext
* Normalize variable and parameter names on "b_" prefix when dealing with bytes
* Test changes:
  * Remove redundant tests( both checking the same byte string)
  * Fix use of format string without format operator
  * Enable vault editor tests on python3
  * Initialize the vault_cipher for VaultAES256 testing in setUp()
  * Make assertTrue and assertFalse take the actual method calls for
    better error messages.
  * Test that non-ascii byte strings compare correctly.
  * Test that unicode strings and ints raise TypeError

* Test-specific:
  * Removed test_methods_exist().  We only have one VaultLib so the
    implementation is the assurance that the methods exist. (Can use an abc for
    this if it changes).
  * Add tests for both byte string and text string input where the API takes either.
  * Convert "assert" to unittest assert functions or add a custom message where
    that will make failures easier to debug.
  * Move instantiating the VaultLib into setUp().
8 years ago
Toshio Kuratomi 0139298786 Have unittests import mock from ansible.compat so they work on py3 without mock installed from pypi 8 years ago
nitzmahone c17a3bac37 roadmap update for Windows tasks 8 years ago
Matt Clay 16baef1f72 Do not use bare vars in integration tests. (#17599) 8 years ago
jctanner b93de25204 During initial argument evaluation, cast args to string. (#17595)
Later in the stack, further code will check and inform the user that var names must start with a letter
or underscore, so this fix only allows us to get to that previously existing policy.

Fixes #16008
8 years ago
Adrian Likins 2c54a8471f Improve inventory script error messages. (#17589)
When an inventory file looks executable (with a #!) but
isn't, the error message could be confusing. Especially
if the inventory file was named something like 'inventory'
or 'hosts'. Add some context and quote the filename.

This is based on https://github.com/ansible/ansible/pull/15758
8 years ago