Commit Graph

16949 Commits (cc27fc368a817d03b89f79c4eac03d7551a12a8c)
 

Author SHA1 Message Date
Toshio Kuratomi 0d7d22d530 Add json and fetch_url notes to checklist 11 years ago
Brian Coca 17103dd4cc update submodule refs 11 years ago
Brian Coca 6cdee94c33 added missing skipped item function to base 11 years ago
Brian Coca 6f93d228f6 made item output closer to v1 11 years ago
Brian Coca 4f9d719b14 removed debug 11 years ago
Brian Coca d78c2fc212 now reports per task item 11 years ago
James Cammarata 2d90cbf78b Properly fail results with rc != 0
Fixes #11769
11 years ago
Brian Coca 787a0c4e04 fixed indent issues 11 years ago
Vilmos Nebehaj 58cccce384 Use PBKDF2HMAC() from cryptography for vault keys.
When stretching the key for vault files, use PBKDF2HMAC() from the
cryptography package instead of pycrypto. This will speed up the opening
of vault files by ~10x.

The problem is here in lib/ansible/utils/vault.py:

    hash_function = SHA256

    # make two keys and one iv
    pbkdf2_prf = lambda p, s: HMAC.new(p, s, hash_function).digest()

    derivedkey = PBKDF2(password, salt, dkLen=(2 * keylength) + ivlength,
                        count=10000, prf=pbkdf2_prf)

`PBKDF2()` calls a Python callback function (`pbkdf2_pr()`) 10000 times.
If one has several vault files, this will cause excessive start times
with `ansible` or `ansible-playbook` (we experience ~15 second startup
times).

Testing the original implementation in 1.9.2 with a vault file:

In [2]: %timeit v.decrypt(encrypted_data)
1 loops, best of 3: 265 ms per loop

Having a recent OpenSSL version and using the vault.py changes in this commit:

In [2]: %timeit v.decrypt(encrypted_data)
10 loops, best of 3: 23.2 ms per loop
11 years ago
Brian Coca 77fc3ce759 removed unused import 11 years ago
Brian Coca aa5bd8c2b5 added pam_limits to changelog 11 years ago
Lukas Pirl d9aa14feea fixes remote code execution for su/sudo and strict remote umasks
* temporarily changes umask for creating temporary directories
    * otherwise parent directories may not get chmod'ed and end up
      unreadable
refs #9902
11 years ago
James Cammarata e505a1b7c4 Fix variable precedence integrationt test 11 years ago
Brian Coca c76a66694f fixed typo 11 years ago
Brian Coca d9c63fb273 added openvz to inventory 11 years ago
Brian Coca 80ecab5317 Merge pull request #11761 from amenonsen/9843-rebase
Add pciid to LinuxNetwork interface fact
11 years ago
Hugh Saunders f344ec463f Add LVM facts to setup module
This commit adds LinuxHardware.get_device_facts() and calls that from
.populate().

LVM facts are only gathered if the setup module is running as root and
the lvm utilities are available (tested by searching for 'vgs').

If the conditions are met, facts are set for each volume group and
logical volume.

Example:

Test LVM Data:
$ sudo vgs
  VG   #PV #LV #SN Attr   VSize VFree
  test   1   2   0 wz--n- 5.00g 2.00g
$ sudo lvs
  LV      VG   Attr      LSize Pool Origin Data%  Move Log Copy%  Convert
  testlv  test -wi-a---- 1.00g
  testlv2 test -wi-a---- 2.00g

Facts Returned:
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {
        "ansible_lvm": {
            "lvs": {
                "testlv": {
                    "size_g": "1.00",
                    "vg": "test"
                },
                "testlv2": {
                    "size_g": "2.00",
                    "vg": "test"
                }
            },
            "vgs": {
                "test": {
                    "free_g": "2.00",
                    "num_lvs": "2",
                    "num_pvs": "1",
                    "size_g": "5.00"
                }
            }
        }
    },
    "changed": false
}

Test as non-root:
$ ansible localhost -i /tmp/inv-user -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}

Test without lvm utilities available
$ sudo mv /sbin/vgs{,.bk}
$ ansible localhost -i /tmp/inv -m setup -a 'filter=ansible_lvm'
localhost | success >> {
    "ansible_facts": {},
    "changed": false
}
11 years ago
Brian Coca 5f8db9cd4b changed verbose_override to the new _ansible_verbose_override to keep in line with previous changes
output now defaults back to having indent=4
11 years ago
Trapier Marshall 250620f2ab Add pciid to LinuxNetwork interface fact
This commit adds pciid to the LinuxNetwork fact object.

pciid is gathered if the symlink /sys/class/net/*/device exists.

Example [>>>> emphasis <<<<]:

$ readlink /sys/class/net/eth0/device
../../../0000:01:00.0

$ ansible localhost --ask-pass -i /tmp/hosts -m setup -a "filter=ansible_eth0"
SSH password:
localhost | success >> {
    "ansible_facts": {
        "ansible_eth0": {
            "active": false,
            "device": "eth0",
            "macaddress": "0c:d2:92:5d:6e:8e",
            "module": "alx",
            "mtu": 1500,
       >>>> "pciid": "0000:01:00.0", <<<<
            "promisc": true,
            "type": "ether"
        }
    },
    "changed": false
}
11 years ago
Brian Coca 8746e692c1 changed check to allow for powerpc
fixes #11528
11 years ago
Brian Coca 0c21196633 moved openvz inventory script to new home 11 years ago
Brian Coca 164092a835 optimized module docs 11 years ago
Brian Coca 65c649aa3e added virt_net to changelog 11 years ago
Brian Coca 772841a0a2 added virt_pool module to changelog 11 years ago
Brian Coca 330aee33c5 Merge pull request #8358 from jordonr/devel
Added OpenVZ Inventory python script
11 years ago
Brian Coca 2575e1540a Merge pull request #11740 from amenonsen/8602-rebase
Encrypt the vault file after editing only if the contents changed
11 years ago
Toshio Kuratomi d2346fd2e2 Python2.4 compat fix 11 years ago
Brian Coca 12e3a2a0c1 Merge pull request #11759 from resmo/fix/doc-changelog
changelog: fix typos
11 years ago
Rene Moser 41319dc202 changelog: fix typos 11 years ago
James Cammarata d6cafff2f9 Additional changes to fix fileglob relative path lookups 11 years ago
Brian Coca 9416fc6271 Merge pull request #8977 from billwanjohi/add_package_classifiers
add distutils package classifiers
11 years ago
Brian Coca 010e58ebfa Merge pull request #9878 from ansible/handle-quoted-comma-dict-param
Handle quoting of values in dict parameters
11 years ago
billwanjohi b2739cec6d add distutils package classifiers
I was particularly interested in the programming language ones,
but the others might be useful to others browsing PyPI.

Now with GPLv3+, and Utilities topic.
11 years ago
Toshio Kuratomi 6a68be4e28 Handle quoting of values in dict parameters 11 years ago
James Cammarata cb262449c7 Reworking internal result flags and making sure include_vars hides vault data
Fixes #10194
11 years ago
James Cammarata eebf437d87 Submodule pointer update 11 years ago
Brian Coca b2b19a1dc4 Merge pull request #11751 from amenonsen/playwithoutbook
A better error message for «ansible playbook.yml»
11 years ago
James Cammarata 7d8afad28c Merge pull request #11750 from amenonsen/example-prompt
Fix incorrect example of vars_prompt
11 years ago
James Cammarata 49a6601856 Further cleanup of internal use of ansible_ssh_host 11 years ago
James Cammarata ee835ff7ad Add a base-level get_basedir method for lookup plugins and fix relative lookups
Fixes #11746
11 years ago
bryan hunt 7a76fcb159 merged 11 years ago
Abhijit Menon-Sen 65d62090c2 A better error message for «ansible playbook.yml»
This is a very conservative change: we add the hint only if we're
definitely going to die already.
11 years ago
James Cammarata 3a4dd523d3 Fix bug where we calculated the relative path of recurisive copies wrong
Fixes #11470
11 years ago
Abhijit Menon-Sen bb12121225 Fix incorrect example of vars_prompt 11 years ago
James Cammarata a1a8997e89 Merge pull request #11663 from whereismyjetpack/fix_ansible_ssh_host
only set ansible_ssh_host if not already set
11 years ago
Brian Coca a56ff7ae54 now it really is oneline 11 years ago
Brian Coca 5d1d9f1505 fixed diff output to be as it was in 1.x, copy and template now use the same
functions to do difs.
11 years ago
James Cammarata c56a304ad9 Merge pull request #9195 from reedloden/add-dns-facts
Add several DNS-related facts by parsing /etc/resolv.conf
11 years ago
James Cammarata ccb7fb3b4c Submodule pointer update 11 years ago
James Cammarata 034c766439 Fixing logic in template.py to not assume 'changed' is in the result 11 years ago