| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
from __future__ import absolute_import, division, print_function |
| 18 |
__metaclass__ = type |
| 19 |
|
| 20 |
|
| 21 |
class ModuleDocFragment(object): |
| 22 |
|
| 23 |
|
| 24 |
DOCUMENTATION = ''' |
| 25 |
requirements: |
| 26 |
- requests |
| 27 |
options: |
| 28 |
server_url: |
| 29 |
description: |
| 30 |
- URL of the Foreman server. |
| 31 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL) will be used instead. |
| 32 |
required: true |
| 33 |
type: str |
| 34 |
username: |
| 35 |
description: |
| 36 |
- Username accessing the Foreman server. |
| 37 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME) will be used instead. |
| 38 |
required: false |
| 39 |
type: str |
| 40 |
password: |
| 41 |
description: |
| 42 |
- Password of the user accessing the Foreman server. |
| 43 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD) will be used instead. |
| 44 |
required: false |
| 45 |
type: str |
| 46 |
oauth1_consumer_key: |
| 47 |
description: |
| 48 |
- OAuth1 consumer key for accessing the Foreman server. |
| 49 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_OAUTH1_CONSUMER_KEY) will be used instead. |
| 50 |
required: false |
| 51 |
type: str |
| 52 |
oauth1_consumer_secret: |
| 53 |
description: |
| 54 |
- OAuth1 consumer secret for accessing the Foreman server. |
| 55 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_OAUTH1_CONSUMER_SECRET) will be used instead. |
| 56 |
required: false |
| 57 |
type: str |
| 58 |
validate_certs: |
| 59 |
description: |
| 60 |
- Whether or not to verify the TLS certificates of the Foreman server. |
| 61 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS) will be used instead. |
| 62 |
default: true |
| 63 |
type: bool |
| 64 |
use_gssapi: |
| 65 |
description: |
| 66 |
- Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. |
| 67 |
- Requires the Python library L(requests-gssapi,https://github.com/pythongssapi/requests-gssapi) to be installed. |
| 68 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_USE_GSSAPI) will be used instead. |
| 69 |
default: false |
| 70 |
type: bool |
| 71 |
ca_path: |
| 72 |
description: |
| 73 |
- PEM formatted file that contains a CA certificate to be used for validation. |
| 74 |
- If the value is not specified in the task, the value of environment variable C(FOREMAN_CA_PATH) will be used instead. |
| 75 |
type: path |
| 76 |
attributes: |
| 77 |
check_mode: |
| 78 |
description: Can run in check_mode and return changed status prediction without modifying the entity |
| 79 |
support: full |
| 80 |
diff_mode: |
| 81 |
description: Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
| 82 |
support: full |
| 83 |
''' |
| 84 |
|
| 85 |
NESTED_PARAMETERS = ''' |
| 86 |
options: |
| 87 |
parameters: |
| 88 |
description: |
| 89 |
- Entity domain specific host parameters |
| 90 |
required: false |
| 91 |
type: list |
| 92 |
elements: dict |
| 93 |
suboptions: |
| 94 |
name: |
| 95 |
description: |
| 96 |
- Name of the parameter |
| 97 |
required: true |
| 98 |
type: str |
| 99 |
value: |
| 100 |
description: |
| 101 |
- Value of the parameter |
| 102 |
required: true |
| 103 |
type: raw |
| 104 |
parameter_type: |
| 105 |
description: |
| 106 |
- Type of the parameter |
| 107 |
default: 'string' |
| 108 |
choices: |
| 109 |
- 'string' |
| 110 |
- 'boolean' |
| 111 |
- 'integer' |
| 112 |
- 'real' |
| 113 |
- 'array' |
| 114 |
- 'hash' |
| 115 |
- 'yaml' |
| 116 |
- 'json' |
| 117 |
type: str |
| 118 |
hidden_value: |
| 119 |
description: |
| 120 |
- Should the value be hidden |
| 121 |
required: false |
| 122 |
type: bool |
| 123 |
''' |
| 124 |
|
| 125 |
OS_FAMILY = ''' |
| 126 |
options: |
| 127 |
os_family: |
| 128 |
description: |
| 129 |
- The OS family the entity shall be assigned with. |
| 130 |
required: false |
| 131 |
choices: |
| 132 |
- AIX |
| 133 |
- Altlinux |
| 134 |
- Archlinux |
| 135 |
- Coreos |
| 136 |
- Debian |
| 137 |
- Fcos |
| 138 |
- Freebsd |
| 139 |
- Gentoo |
| 140 |
- Junos |
| 141 |
- NXOS |
| 142 |
- Rancheros |
| 143 |
- Redhat |
| 144 |
- Rhcos |
| 145 |
- Solaris |
| 146 |
- Suse |
| 147 |
- VRP |
| 148 |
- Windows |
| 149 |
- Xenserver |
| 150 |
type: str |
| 151 |
''' |
| 152 |
|
| 153 |
TAXONOMY = ''' |
| 154 |
options: |
| 155 |
organizations: |
| 156 |
description: List of organizations the entity should be assigned to |
| 157 |
type: list |
| 158 |
elements: str |
| 159 |
locations: |
| 160 |
description: List of locations the entity should be assigned to |
| 161 |
type: list |
| 162 |
elements: str |
| 163 |
''' |
| 164 |
|
| 165 |
ENTITY_STATE = ''' |
| 166 |
options: |
| 167 |
state: |
| 168 |
description: |
| 169 |
- State of the entity |
| 170 |
default: present |
| 171 |
choices: |
| 172 |
- present |
| 173 |
- absent |
| 174 |
type: str |
| 175 |
''' |
| 176 |
|
| 177 |
ENTITY_STATE_WITH_DEFAULTS = ''' |
| 178 |
options: |
| 179 |
state: |
| 180 |
description: |
| 181 |
- State of the entity |
| 182 |
- C(present_with_defaults) will ensure the entity exists, but won't update existing ones |
| 183 |
default: present |
| 184 |
choices: |
| 185 |
- present |
| 186 |
- present_with_defaults |
| 187 |
- absent |
| 188 |
type: str |
| 189 |
''' |
| 190 |
|
| 191 |
HOST_OPTIONS = ''' |
| 192 |
options: |
| 193 |
compute_resource: |
| 194 |
description: Compute resource name |
| 195 |
required: false |
| 196 |
type: str |
| 197 |
compute_profile: |
| 198 |
description: Compute profile name |
| 199 |
required: false |
| 200 |
type: str |
| 201 |
domain: |
| 202 |
description: Domain name |
| 203 |
required: false |
| 204 |
type: str |
| 205 |
subnet: |
| 206 |
description: IPv4 Subnet name |
| 207 |
required: false |
| 208 |
type: str |
| 209 |
subnet6: |
| 210 |
description: IPv6 Subnet name |
| 211 |
required: false |
| 212 |
type: str |
| 213 |
root_pass: |
| 214 |
description: |
| 215 |
- Root password. |
| 216 |
- Will result in the entity always being updated, as the current password cannot be retrieved. |
| 217 |
type: str |
| 218 |
required: false |
| 219 |
realm: |
| 220 |
description: Realm name |
| 221 |
required: false |
| 222 |
type: str |
| 223 |
architecture: |
| 224 |
description: Architecture name |
| 225 |
required: false |
| 226 |
type: str |
| 227 |
medium: |
| 228 |
aliases: [ media ] |
| 229 |
description: |
| 230 |
- Medium name |
| 231 |
- Mutually exclusive with I(kickstart_repository). |
| 232 |
required: false |
| 233 |
type: str |
| 234 |
pxe_loader: |
| 235 |
description: PXE Bootloader |
| 236 |
required: false |
| 237 |
choices: |
| 238 |
- PXELinux BIOS |
| 239 |
- PXELinux UEFI |
| 240 |
- Grub UEFI |
| 241 |
- Grub2 BIOS |
| 242 |
- Grub2 ELF |
| 243 |
- Grub2 UEFI |
| 244 |
- Grub2 UEFI SecureBoot |
| 245 |
- Grub2 UEFI HTTP |
| 246 |
- Grub2 UEFI HTTPS |
| 247 |
- Grub2 UEFI HTTPS SecureBoot |
| 248 |
- iPXE Embedded |
| 249 |
- iPXE UEFI HTTP |
| 250 |
- iPXE Chain BIOS |
| 251 |
- iPXE Chain UEFI |
| 252 |
- None |
| 253 |
type: str |
| 254 |
ptable: |
| 255 |
description: Partition table name |
| 256 |
required: false |
| 257 |
type: str |
| 258 |
environment: |
| 259 |
description: Puppet environment name |
| 260 |
required: false |
| 261 |
type: str |
| 262 |
puppetclasses: |
| 263 |
description: List of puppet classes to include in this host group. Must exist for hostgroup's puppet environment. |
| 264 |
required: false |
| 265 |
type: list |
| 266 |
elements: str |
| 267 |
config_groups: |
| 268 |
description: Config groups list |
| 269 |
required: false |
| 270 |
type: list |
| 271 |
elements: str |
| 272 |
puppet_proxy: |
| 273 |
description: Puppet server proxy name |
| 274 |
required: false |
| 275 |
type: str |
| 276 |
puppet_ca_proxy: |
| 277 |
description: Puppet CA proxy name |
| 278 |
required: false |
| 279 |
type: str |
| 280 |
openscap_proxy: |
| 281 |
description: |
| 282 |
- OpenSCAP proxy name. |
| 283 |
- Only available when the OpenSCAP plugin is installed. |
| 284 |
required: false |
| 285 |
type: str |
| 286 |
content_source: |
| 287 |
description: |
| 288 |
- Content Source (Smart Proxy with Content) name. |
| 289 |
- Only available for Katello installations. |
| 290 |
required: false |
| 291 |
type: str |
| 292 |
lifecycle_environment: |
| 293 |
description: |
| 294 |
- Lifecycle environment. |
| 295 |
- Only available for Katello installations. |
| 296 |
required: false |
| 297 |
type: str |
| 298 |
kickstart_repository: |
| 299 |
description: |
| 300 |
- Kickstart repository name. |
| 301 |
- You need to provide this to use the "Synced Content" feature. |
| 302 |
- Mutually exclusive with I(medium). |
| 303 |
- Only available for Katello installations. |
| 304 |
required: false |
| 305 |
type: str |
| 306 |
content_view: |
| 307 |
description: |
| 308 |
- Content view. |
| 309 |
- Only available for Katello installations. |
| 310 |
required: false |
| 311 |
type: str |
| 312 |
activation_keys: |
| 313 |
description: |
| 314 |
- Activation Keys used for deployment. |
| 315 |
- Comma separated list. |
| 316 |
- Only available for Katello installations. |
| 317 |
required: false |
| 318 |
type: str |
| 319 |
''' |
| 320 |
|
| 321 |
ORGANIZATION = ''' |
| 322 |
options: |
| 323 |
organization: |
| 324 |
description: |
| 325 |
- Organization that the entity is in |
| 326 |
required: true |
| 327 |
type: str |
| 328 |
''' |
| 329 |
|
| 330 |
SCAP_DATASTREAM = ''' |
| 331 |
options: |
| 332 |
scap_file: |
| 333 |
description: |
| 334 |
- File containing XML DataStream content. |
| 335 |
- Required when creating a new DataStream. |
| 336 |
required: false |
| 337 |
type: path |
| 338 |
original_filename: |
| 339 |
description: |
| 340 |
- Original file name of the XML file. |
| 341 |
- If unset, the filename of I(scap_file) will be used. |
| 342 |
required: false |
| 343 |
type: str |
| 344 |
''' |
| 345 |
|
| 346 |
OPERATINGSYSTEMS = ''' |
| 347 |
options: |
| 348 |
operatingsystems: |
| 349 |
description: |
| 350 |
- List of operating systems the entity should be assigned to. |
| 351 |
- Operating systems are looked up by their title which is composed as "<name> <major>.<minor>". |
| 352 |
- You can omit the version part as long as you only have one operating system by that name. |
| 353 |
required: false |
| 354 |
type: list |
| 355 |
elements: str |
| 356 |
''' |
| 357 |
|
| 358 |
OPERATINGSYSTEM = ''' |
| 359 |
options: |
| 360 |
operatingsystem: |
| 361 |
description: |
| 362 |
- Operating systems are looked up by their title which is composed as "<name> <major>.<minor>". |
| 363 |
- You can omit the version part as long as you only have one operating system by that name. |
| 364 |
type: str |
| 365 |
required: false |
| 366 |
''' |
| 367 |
|
| 368 |
INFOMODULE = ''' |
| 369 |
options: |
| 370 |
name: |
| 371 |
description: |
| 372 |
- Name of the resource to fetch information for. |
| 373 |
- Mutually exclusive with I(search). |
| 374 |
required: false |
| 375 |
type: str |
| 376 |
location: |
| 377 |
description: |
| 378 |
- Label of the Location to scope the search for. |
| 379 |
required: false |
| 380 |
type: str |
| 381 |
organization: |
| 382 |
description: |
| 383 |
- Name of the Organization to scope the search for. |
| 384 |
required: false |
| 385 |
type: str |
| 386 |
search: |
| 387 |
description: |
| 388 |
- Search query to use |
| 389 |
- If None, and I(name) is not set, all resources are returned. |
| 390 |
- Mutually exclusive with I(name). |
| 391 |
type: str |
| 392 |
''' |
| 393 |
|
| 394 |
INFOMODULEWITHOUTNAME = ''' |
| 395 |
options: |
| 396 |
location: |
| 397 |
description: |
| 398 |
- Label of the Location to scope the search for. |
| 399 |
required: false |
| 400 |
type: str |
| 401 |
organization: |
| 402 |
description: |
| 403 |
- Name of the Organization to scope the search for. |
| 404 |
required: false |
| 405 |
type: str |
| 406 |
search: |
| 407 |
description: |
| 408 |
- Search query to use |
| 409 |
- If None, all resources are returned. |
| 410 |
type: str |
| 411 |
''' |
| 412 |
|
| 413 |
KATELLOINFOMODULE = ''' |
| 414 |
options: |
| 415 |
organization: |
| 416 |
required: true |
| 417 |
''' |
| 418 |
|
| 419 |
KATELLOEXPORT = ''' |
| 420 |
options: |
| 421 |
chunk_size_gb: |
| 422 |
description: |
| 423 |
- Split the exported content into archives no greater than the specified size in gigabytes. |
| 424 |
- Only applicable for C(format=importable). C(syncable) exports can't be split. |
| 425 |
required: false |
| 426 |
type: int |
| 427 |
format: |
| 428 |
description: |
| 429 |
- Export format. |
| 430 |
- Choose C(syncable) if the exported content needs to be in a yum format. |
| 431 |
required: false |
| 432 |
type: str |
| 433 |
choices: |
| 434 |
- syncable |
| 435 |
- importable |
| 436 |
version_added: 3.10.0 |
| 437 |
incremental: |
| 438 |
description: |
| 439 |
- Export only the content that has changed since the last export. |
| 440 |
required: false |
| 441 |
type: bool |
| 442 |
from_history_id: |
| 443 |
description: |
| 444 |
- Export history identifier used for incremental export. If not provided the most recent export history will be used. |
| 445 |
required: false |
| 446 |
type: int |
| 447 |
''' |
| 448 |
|
| 449 |
KATELLOIMPORT = ''' |
| 450 |
options: |
| 451 |
path: |
| 452 |
description: |
| 453 |
- Directory containing the exported repository, version or library. |
| 454 |
required: true |
| 455 |
type: str |
| 456 |
metadata: |
| 457 |
description: |
| 458 |
- Contents of the metadata.json file. This is not required if the metadata_file location is provided. |
| 459 |
type: dict |
| 460 |
metadata_file: |
| 461 |
description: |
| 462 |
- Location of the metadata.json file. Not required if the metadata has been already provided via the other parameter. |
| 463 |
type: str |
| 464 |
''' |