Commit Graph

9453 Commits (e7f74251c883bcf73982c3092d92aa8eed32a065)
 

Author SHA1 Message Date
Richard Isaacson 5dfe16ee5a Merge pull request #5964 from sl4mmy/with-dict
lookup_plugins: loop over hashes

Tests good with the global variables:
```
users:
  alice:
    name: Alice
    id: 12345
  luna:
    name: Luna
    id: 23456
```

and playbook tasks:
```
- name: Print records.
  debug: msg="User {{ item.key }} is {{ item.value.name }}  {{ item.value.id }}"
  with_dict: users
```
11 years ago
Kent R. Spillner 1fcc9ff666 lookup_plugins: loop over hashes
Create a lookup plugin named dict that can be used to loop over hashes.
It converts a dict into a list of key-value pairs, with attributes named
"key" and "value."  Also adds a brief explanation and simple example to
the docs.

Signed-off-by: Kent R. Spillner <kspillner@acm.org>
11 years ago
James Tanner 876035c0b1 Fixes #6161 Get the delegate host info properly from the hostvars object 11 years ago
James Tanner e121ff111d Fix synchronize unit test to handle checkmode 11 years ago
James Tanner 9209581565 Fixes #6155 Inject checkmode into synchronize module args 11 years ago
James Cammarata 6fe369fca0 Merge branch 'usermod_fix' of https://github.com/tknguyen79/ansible into tknguyen79-usermod_fix
Conflicts:
	library/system/user
11 years ago
James Cammarata 97eededc99 Handle unicode content in the uri module properly
Fixes #5869
11 years ago
James Cammarata a18f811b2d Merge branch 'jimi-c-issue_4620' into devel 11 years ago
James Cammarata f23ccebbdc Merge branch 'issue_4620' of https://github.com/jimi-c/ansible into jimi-c-issue_4620 11 years ago
James Tanner 0f95a905d9 Fixes #5965 Ensure the inject for each item in a loop is un-altered 11 years ago
Richard Isaacson abb4f2fbda Merge pull request #6160 from risaacson/pull_5775_2
Fixed up merge for the lvol module.
11 years ago
Stefan J. Betz 789ae4697c Require force for LVM shrink and remove operations in lvol. Fixes #5774
Conflicts:
	library/system/lvol
11 years ago
Michael DeHaan 05bf80751b Merge pull request #6158 from risaacson/issues_5165
If you try to resize a lvol to the current size return a changed=False and don't fail.
11 years ago
Michael DeHaan 031aaa1018 Merge pull request #6157 from rgbkrk/patch-1
Fix expires
11 years ago
Richard C Isaacson bf30707670 If you try to resize a lvol to the current size return a changed=False and don't fail.
This addresses GH-5165 and adds the ability to check if a lvol exists.

The tests for this don't fit nicely into the current integration tests so they are below.

```
---

- name: remove any existing lv=one of vg=main
  lvol: lv=one vg=main state=absent

- name: remove any existing lv=two of vg=main
  lvol: lv=two vg=main state=absent

- name: check to see if lv=one of vg=main exists
  lvol: lv=one vg=main state=present
  ignore_errors: true
  register: lvol_result0

- name: Assert that we will get a "No size given."
  assert:
    that:
      - "'No size given.' in lvol_result0.msg"

- name: create lv=one of vg=main sized 30g
  lvol: lv=one size=30g vg=main state=present
  register: lvol_result1

- name: Assert that we made changes."
  assert:
    that:
      - "lvol_result1.changed == True"

- name: check to see if lv=one of vg=main exists
  lvol: lv=one vg=main state=present
  register: lvol_result2

- name: Assert that we did not make changes."
  assert:
    that:
      - "lvol_result2.changed == False"

- name: remove lv=one of vg=main
  lvol: lv=one vg=main state=absent

- name: create lv=two of vg=main sized 30G
  lvol: lv=two size=30G vg=main state=present
  register: lvol_result3

- name: Assert that we made changes."
  assert:
    that:
      - "lvol_result3.changed == True"

- name: reduce lv=two of vg=main to 15G
  lvol: lv=two size=15G vg=main state=present
  register: lvol_result4

- name: Assert that we made changes."
  assert:
    that:
      - "lvol_result4.changed == True"

- name: increase lv=two of vg=main to 30G
  lvol: lv=two size=30G vg=main state=present
  register: lvol_result5

- name: Assert that we made changes."
  assert:
    that:
      - "lvol_result5.changed == True"

- name: create lv=two of vg=main sized 30G when already exists at 30G
  lvol: lv=two size=30g vg=main state=present
  register: lvol_result6

- name: Assert that we did not make changes."
  assert:
    that:
      - "lvol_result6.changed == False"

- name: remove lv=two of vg=main
  lvol: lv=two vg=main state=absent
```
11 years ago
Kyle Kelley b5eb4d2a71 Fix expires 11 years ago
James Cammarata be0be16e89 Merge branch '5853-python-2.5-apt_repository-fix' of https://github.com/timurbatyrshin/ansible into timurbatyrshin-5853-python-2.5-apt_repository-fix 11 years ago
James Cammarata 7517cd9398 Moving the assemble test to the correct location 11 years ago
Iordan Iordanov a1854bb762 Add support for checking host against global known host files. 11 years ago
James Cammarata 4e49b32419 Adding a version note to the expanduser filter documentation 11 years ago
James Cammarata 3b2d409906 Fixing several bugs in assemble and updating tests
Bugfixes:
* the remote_src param was not being converted to a boolean correctly,
  resulting in it never being used by the module as the default behavior
  was remote_src=True (issue #5581)
* the remote_src param was not listed in the generic file params, leading
  to a failure when the above bug regarding remote_src was fixed
* the delimiter should always end with a newline to ensure that the file
  fragments do not run together on one line

Fixes #5581
11 years ago
James Cammarata f03d6a67c8 Adding new tests for assemble role 11 years ago
Michael DeHaan 0a83f743c1 Merge pull request #6146 from jlaska/test_synchronize
Correct assert and add with_items test
11 years ago
James Laska 40e0204051 Correct assert and add with_items test 11 years ago
jctanner 8a253bf576 Merge pull request #6151 from jctanner/vault_rewrite
Vault rewrite, pass 1
11 years ago
Michael DeHaan e999881f81 Merge pull request #6153 from jjshoe/patch-1
Typo/Grammar fix.
11 years ago
James Tanner 39603b06e8 Update changelog for ansible_ssh_private_key_file templating 11 years ago
jctanner 93c746db9c Merge pull request #5651 from nikut/sshfix
allow ansible_ssh_private_key_file to be templated (thanks to benno)
11 years ago
jjshoe 6942e0eea1 Typo/Grammar fix. 11 years ago
James Tanner 9c9f15acb7 Fix decryption error 11 years ago
James Tanner 52a8efefba Vault rewrite, pass 1 11 years ago
Hagai ae9c0d87a9 Fix incorrect use of .join on list 11 years ago
Richard Isaacson 13604e75f4 Merge pull request #6149 from risaacson/issues_4986
This tests clean with the new integration tests.
11 years ago
Richard C Isaacson 8be8dbc9ed Formatting cleanup. 11 years ago
Richard C Isaacson 087f7c230d Typo fixes. 11 years ago
Richard C Isaacson 0446a030d7 Typo fixes. 11 years ago
Richard C Isaacson dcbc69b69c Added script to the new integration tests. 11 years ago
Richard C Isaacson aaf0a182e1 Merge remote-tracking branch 'jeromew/ansible_script_creates' into issues_4986 11 years ago
Richard C Isaacson e2a47162d0 Added test for failed_when to non_destructive integration tests. 11 years ago
Michael DeHaan 00ed610a34 Merge pull request #6140 from andyhky/fix_typo
Fix typo in guide_rax
11 years ago
Andy Hill bd90fdae94 Fix typo in guide_rax 11 years ago
Richard C Isaacson 0c33e936d4 Adding tests for the command and shell modules. 11 years ago
Michael DeHaan 7638d8ff46 Update CODING_GUIDELINES.md 11 years ago
Michael DeHaan c7ae1ee978 Merge pull request #6130 from Azulinho/devel
replace test 'wget' package with 'hello' package
11 years ago
Azul 89cee747d9 replace test 'wget' package with 'hello' package 11 years ago
Michael DeHaan d7dd04c295 Merge pull request #6121 from lalinsky/fix_dev_docs
Remove obsolete module development docs
11 years ago
Lukáš Lalinský 95d102f5e4 Remove obsolete module development docs 11 years ago
Michael DeHaan c7a30df574 Merge pull request #6116 from spatten/devel
In the route53 module, documenting that TXT and SPF values must be surrounded by quotes
11 years ago
Scott Patten dbde446358 In the route53 module, documenting that TXT and SPF requests
must be surrounded by quotes.

Otherwise you get a cryptic error message from Route 53.
11 years ago
Michael DeHaan 9686695170 Assume empty files are unencrypted. 11 years ago