community.general.katello – Manage Katello Resources¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.katello
.
DEPRECATED¶
- Removed in
version 2.0.0
- Why
Replaced by re-designed individual modules living at https://github.com/theforeman/foreman-ansible-modules
- Alternative
Requirements¶
The below requirements are needed on the host that executes this module.
nailgun >= 0.28.0
python >= 2.6
datetime
Parameters¶
Examples¶
---
# Simple Example:
- name: Create Product
community.general.katello:
username: admin
password: admin
server_url: https://fakeserver.com
entity: product
params:
name: Centos 7
delegate_to: localhost
# Abstraction Example:
# katello.yml
---
- name: "{{ name }}"
community.general.katello:
username: admin
password: admin
server_url: https://fakeserver.com
entity: "{{ entity }}"
params: "{{ params }}"
delegate_to: localhost
# tasks.yml
---
- include: katello.yml
vars:
name: Create Dev Environment
entity: lifecycle_environment
params:
name: Dev
prior: Library
organization: Default Organization
- include: katello.yml
vars:
name: Create Centos Product
entity: product
params:
name: Centos 7
organization: Default Organization
- include: katello.yml
vars:
name: Create 7.2 Repository
entity: repository
params:
name: Centos 7.2
product: Centos 7
organization: Default Organization
content_type: yum
url: http://mirror.centos.org/centos/7/os/x86_64/
- include: katello.yml
vars:
name: Create Centos 7 View
entity: content_view
params:
name: Centos 7 View
organization: Default Organization
repositories:
- name: Centos 7.2
product: Centos 7
- include: katello.yml
vars:
name: Enable RHEL Product
entity: repository_set
params:
name: Red Hat Enterprise Linux 7 Server (RPMs)
product: Red Hat Enterprise Linux Server
organization: Default Organization
basearch: x86_64
releasever: 7
- include: katello.yml
vars:
name: Promote Contentview Environment with longer timeout
task_timeout: 10800
entity: content_view
action: promote
params:
name: MyContentView
organization: MyOrganisation
from_environment: Testing
to_environment: Production
# Best Practices
# In Foreman, things can be done in parallel.
# When a conflicting action is already running,
# the task will fail instantly instead of waiting for the already running action to complete.
# So you should use a "until success" loop to catch this.
- name: Promote Contentview Environment with increased Timeout
community.general.katello:
username: ansibleuser
password: supersecret
task_timeout: 10800
entity: content_view
action: promote
params:
name: MyContentView
organization: MyOrganisation
from_environment: Testing
to_environment: Production
register: task_result
until: task_result is success
retries: 9
delay: 120
Status¶
This module will be removed in version 2.0.0. [deprecated]
For more information see DEPRECATED.
Authors¶
Eric D Helms (@ehelms)