Updated examples and documentation

This commit is contained in:
James Laska 2013-06-06 16:30:06 -04:00
parent 3ba19bf369
commit 19b7cb6653

View file

@ -3,45 +3,52 @@
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: subscription-manager module: subscription-manager
short_description: Define interface to subscription-manager short_description: Manage Red Hat Network registration and subscriptions using the C(subscription-manager) command
description: description:
- Adds or removes Red Hat software channels on a system - Manage registration and subscription to the Red Hat Network entitlement platform.
version_added: 1.0 version_added: 1.2
author: James Laska author: James Laska
notes: notes:
- this module fetches the systemid from rhn. A function - In order to register a system, subscription-manager requires either a
to use the local systemid is provided (get_localsystem) username and password, or an activationkey.
but not integrated
requirements: requirements:
- none - subscription-manager
options: options:
state:
description:
- whether to register and subscribe (C(present)), or unregister (C(absent)) a system
required: false
choices: [ "present", "absent" ]
default: "present"
username: username:
description description
- RHN username - Red Hat Network username
required: false required: false
default: null default: null
password: password:
description: description:
- RHN password - Red Hat Network password
required: false required: false
default: null default: null
server_hostname: server_hostname:
description: description:
- Specify an alternative RHN server - Specify an alternative Red Hat Network server
required: false required: false
default: Current value from C(/etc/rhsm/rhsm.conf) is the default
server_insecure: server_insecure:
description: description:
- Allow RHN traffic over insecure http - Allow traffic over insecure http
required: false required: false
default: false default: Current value from C(/etc/rhsm/rhsm.conf) is the default
rhsm_baseurl: rhsm_baseurl:
description: description:
- Specify CDN baseurl - Specify CDN baseurl
required: false required: false
default: false default: Current value from C(/etc/rhsm/rhsm.conf) is the default
autosubscribe: autosubscribe:
description: description:
- Upon successful registration, auto-consume available subscriptions - Upon successful registration, auto-consume available
subscriptions
required: false required: false
default: false default: false
activationkey: activationkey:
@ -51,11 +58,15 @@ options:
default: null default: null
pool: pool:
description: description:
- A pool to subscribe to (accepts regular expression syntax) - Specify a subscription pool name to consume. Regular expressions
accepted.
required: false required: false
default: '^$' default: '^$'
examples: examples:
- code: subscription_manager action=register username=rhsm_user password=somepass autosubscribe=true - code: subscription_manager action=register username=joe_user password=somepass autosubscribe=true
- description: Register as user I(joe_user) with password I(somepass) and auto-subscribe to available content.
- code: subscription_manager action=register activationkey=1-222333444 pool='^(Red Hat Enterprise Server|Red Hat Virtualization)$'
- description: Register with activationkey I(1-222333444) and consume subscriptions matching the names I(Red hat Enterprise Server) and I(Red Hat Virtualization)
''' '''
import os import os