Commit graph

6281 commits

Author SHA1 Message Date
Michael DeHaan
3e851f5337 Merge pull request #1268 from dagwieers/hpilo-reboot-fix
Workaround for when HP iLO is in a state it won't accept requests
2012-10-10 05:34:22 -07:00
Michael DeHaan
3e560234bc Fix typo in autogenerated docs 2012-10-10 08:32:41 -04:00
Dag Wieers
30a4f903fb Module mail to send out emails as an action
Sending mails could be part of the workflow to have teams/responsibles perform specific task. Or simply to notify that a process has finished successfully (e.g. provisioning).
2012-10-09 19:36:23 +02:00
Dag Wieers
ffd0b830ea Workaround for when HP iLO is in a state it won't accept requests
This workaround is recommended from HP iLO's documentation, but may not be sufficient in all cases. Time will tell.

I also made a few cosmetic changes with no impact.
2012-10-09 19:31:31 +02:00
Michael DeHaan
5a9fc35200 Merge pull request #1263 from dagwieers/hpilo_facts-fix
Sigh, another retypo
2012-10-09 05:22:49 -07:00
Dag Wieers
8da637dac6 Fixes to documentation 2012-10-09 12:42:10 +02:00
Dag Wieers
79d083e80a Sigh, another retypo problem 2012-10-09 12:30:00 +02:00
Michael DeHaan
a70db4fb0b Merge pull request #1250 from dagwieers/hpilo_boot-fixes
Various small fixes to boolean usage and defaults
2012-10-08 14:27:20 -07:00
Michael DeHaan
9c102d8dfc Merge pull request #1243 from dsummersl/squash2-cron
cron feature (w/o tests)
2012-10-08 14:25:55 -07:00
Michael DeHaan
a0e9412180 Merge pull request #1255 from dagwieers/module-namespace
Add this module's namespace to the 'module_' namespace.
2012-10-08 14:25:20 -07:00
Tim Bielawa
7881ddd8cb Fix typo in service module docs 2012-10-08 12:46:16 -04:00
Dane Summers
1d7a5609eb added new documentation string to cron library 2012-10-08 11:10:40 -04:00
Dag Wieers
d1f9644be3 Add this module's namespace to the 'module_' namespace.
Much like we currently have *setup* register the variable `module_setup`, we would like other facts-modules register their own namespace. This means that:

 - *network_facts* registers `module_network`
 - *hpilo_facts* registers `module_hw`
 - *vsphere_facts* registers `module_hw`

In retrospect, it would have made more sense to have `setup` register `module_ansible` instead as the setup module uses the `ansible_` namesepace.

Having the `module_` namespace allows us to check whether a certain namespace has already been loaded so we can avoid running the facts module a second time using only_if.

```yaml
 - action: network_facts host=${ansible_hostname_short}
   only_if: is_unset('$module_network')
```
2012-10-08 15:13:17 +02:00
Dag Wieers
dc11b1223d Various small fixes to boolean usage, using module.params.get and default values 2012-10-08 15:07:02 +02:00
Michael DeHaan
70a14f9a51 Merge pull request #1251 from dagwieers/hpilo_facts-fixes
Fix typo/cosmetic change
2012-10-07 16:58:05 -07:00
Dag Wieers
5651990b0f Add an alias 'name=' for guest
This is the opposite as library/virt, but much better than using name= as the default option name.
2012-10-07 22:23:22 +02:00
Dag Wieers
da026eac76 Fix typo/cosmetic change 2012-10-07 22:12:00 +02:00
Michael DeHaan
4a22ec399f Merge pull request #1249 from dagwieers/module-hpilo_boot
Module hpilo_boot to boot from specific media using an HP iLO interface
2012-10-07 06:12:42 -07:00
Dag Wieers
1c2b8dd7a3 Module hpilo_boot to boot from specific media using an HP iLO interface
This module allows to boot a system through HP iLO and can be used to start the provisioning process.
2012-10-06 23:56:50 +02:00
Michael DeHaan
5711a371e5 Merge pull request #1240 from jpmens/hpdoc
fix examples in hpilo_facts DOCUMENTATION
2012-10-06 13:39:31 -07:00
Dane Summers
d4b7d82299 cron feature (w/o tests) 2012-10-05 21:35:37 -04:00
Michael DeHaan
71a0175db1 Merge pull request #1239 from jpmens/shelldoc
fix wording of shell documentation
2012-10-05 06:11:31 -07:00
Jan-Piet Mens
bd8b42381c fix examples in hpilo_facts DOCUMENTATION 2012-10-05 15:07:45 +02:00
Jan-Piet Mens
0a648e1b07 fix wording of shell documentation 2012-10-05 14:59:49 +02:00
Dag Wieers
580197f197 Use the standard 'dest' option for target files, make 'name' an alias 2012-10-05 11:03:14 +02:00
Michael DeHaan
624d0ae1af Merge pull request #1213 from dagwieers/debug-module
Module debug to assist users in understanding Ansible
2012-10-04 16:28:25 -07:00
Michael DeHaan
15817d9dba Merge pull request #1230 from dagwieers/module-vsphere_facts
Module vsphere_facts to add facts from a VMWare vSphere guest
2012-10-04 16:18:39 -07:00
Michael DeHaan
d514180a88 Merge pull request #1231 from dagwieers/fail-doc-fix
This hopefully fixes the documentation for the fail module
2012-10-04 16:18:10 -07:00
Dag Wieers
029f3ff418 Module vsphere_facts to add facts from a VMWare vSphere guest
This module gathers facts from a VMWare vSphere guest by querying vSphere. The facts include OS, network info (vlan, macaddress) and system info (cpu, memory, uuid) information. Useful information for provisioning and management.
2012-10-04 21:55:16 +02:00
Dag Wieers
4dc37fe679 Module hpilo_facts to add facts from HP iLO interfaces
This module gathers facts from the hardware interface by querying HP iLO. The facts include network info (vlan, macaddress) and system info (cpu, memory, uuid) information. Useful information for provisioning and management.

This module was previously named ilo_facts and mentioned in #1080, #1085, #1125 and #1217.
2012-10-04 21:50:34 +02:00
Dag Wieers
02947eb0b9 This hopefully fixes the documentation for the fail module 2012-10-04 20:58:07 +02:00
Dag Wieers
b64821d543 Module to assist users in understanding Ansible
After helping someone on IRC he was interested to have this debug module in upstream. This module simply 'prints' a message, and can be ordered to fail if needed. It helps to troubleshoot or understand inventory/facts issues and/or experiment with statements and conditions using only_if.

Here is a small example playbook:

```yaml
- hosts: all
  tasks:
  - local_action: debug msg="System $inventory_hostname has uuid ${ansible_product_uuid}"
  - local_action: debug msg="System $inventory_hostname lacks a gateway" fail=yes
    only_if: "is_unset('$ansible_default_ipv4.gateway')"
  - local_action: debug msg="System $inventory_hostname has gateway ${ansible_default_ipv4.gateway}"
    only_if: "is_set('$ansible_default_ipv4.gateway')"
```

outputting:
```
[root@moria ansible]# ansible-playbook -v -l localhost:x220 test6.yml

PLAY [all] *********************

GATHERING FACTS *********************
ok: [localhost]
ok: [x220]

TASK: [debug msg="System $inventory_hostname has uuid $ansible_product_uuid"] *********************
ok: [localhost] => {"msg": "System localhost has uuid d125a48c-364f-4e65-b225-fed42ed61fac"}
ok: [x220] => {"msg": "System x220 has uuid d125a48c-364f-4e65-b225-fed42ed61fac"}

TASK: [debug msg="System $inventory_hostname lacks a gateway" fail=yes] *********************
failed: [localhost] => {"failed": true, "msg": "System localhost lacks a gateway", "rc": 1}
ok: [x220] => {"msg": "System x220 has gateway 192.168.1.1"}

PLAY RECAP *********************
localhost                      : ok=2    changed=0    unreachable=0    failed=1
x220                           : ok=3    changed=0    unreachable=0    failed=0

```

I had some other plans for the module, like displaying host inventory and complete inventory to help understand inventory and facts modules, but that would require an action-plugin for transfering inventory information etc... And I am not sure this is wanted/best done in a module.
2012-10-04 09:50:18 +02:00
Michael DeHaan
1bd1e3ed1f Added documentation on file force parameter 2012-10-03 20:57:36 -04:00
Michael DeHaan
d404737543 various small doc tweaks 2012-10-02 22:43:46 -04:00
Michael DeHaan
2d096ea425 Fixing various module related things. 2012-10-02 22:32:17 -04:00
Michael DeHaan
f3e8ffce43 Call os.path.expanduser in the creates= and removes= section of the command module so ~/ and the like works. 2012-10-02 22:12:49 -04:00
Dag Wieers
2886084ac0 Added a fail module in order to fail execution on certain conditions
In some cases you may want to deliberately fail the execution of a playbook. In our provisioning workflow we want to have safeguards in place to avoid provisioning systems that are already in production. Since we reboot physical and virtual systems, it is mandatory we take all the precautions to prevent accidental provisioning.

So in our use-case we have the following at the very start of the provisioning playbook:

    ### Safeguard to protect production systems
    - local_action: fail msg="System is not ready to be staged according to CMDB"
      only_if: "'$cmdb_status' != 'to-be-staged'"

and we repeat the same task in the (separate included) play that takes care of (re)booting the system using our own boot-media, so that it cannot be accidentally separately run by someone.
2012-10-02 21:40:28 +02:00
Petetin Ludovic
e3cb4163a9 Fix issue https://github.com/ansible/ansible/issues/1194 2012-10-02 15:12:33 +02:00
Michael DeHaan
873013363c Merge pull request #1189 from jpmens/nagpause
standardize DOCUMENTATION for nagios, pause
2012-10-02 05:15:56 -07:00
Jan-Piet Mens
c01354d12d attempt at DOCUMENTATION for async_status 2012-10-02 09:56:55 +02:00
Jan-Piet Mens
d27706f7c5 standardize DOCUMENTATION for nagios, pause 2012-10-02 09:15:11 +02:00
Michael DeHaan
ef7811e4d4 Teach fireball mode to disable the fireball by paying attention to 'minutes=N' (default 30) and do not let fireball module crash
on input.
2012-10-01 22:41:00 -04:00
Michael DeHaan
413a03f723 Merge pull request #1185 from tbielawa/pause_docs
Add DOCUMENTATION to pause task
2012-10-01 19:09:24 -07:00
Tim Bielawa
6f7b3e9907 Add DOCUMENTATION to pause task 2012-10-01 12:42:03 -04:00
Tim Bielawa
3eff193e4c Add DOCUMENTATION to nagios module. 2012-10-01 12:26:57 -04:00
Michael DeHaan
ac4d62d4dc Merge pull request #1176 from jpmens/fireball-doc1
fireball DOCUMENTATION
2012-10-01 05:46:02 -07:00
Jan-Piet Mens
8baea3d38a fireball DOCUMENTATION
- amended
2012-10-01 14:39:15 +02:00
Michael DeHaan
2f14545f2c Merge pull request #1170 from jpmens/docspatch01
Jumbo DOCUMENTATION patch
2012-10-01 05:19:16 -07:00
Michael DeHaan
0f83fefeda Merge pull request #1173 from dhozac/command-quote-less
Use a regexp to filter out arguments instead
2012-10-01 05:17:29 -07:00
Jan-Piet Mens
a790c399f4 Added attribution to all module DOCUMENTATION strings 2012-10-01 12:37:51 +02:00