theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
145 stars 162 forks source link
ansible ansible-modules foreman foreman-ansible-modules foreman-api hacktoberfest katello orcharhino satellite

Foreman Ansible Modules Build Status

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello.

Documentation

A list of all modules and their documentation can be found at theforeman.org/plugins/foreman-ansible-modules.

Support

Supported Foreman and plugins versions

Modules should support any currently stable Foreman release and the matching set of plugins. Some modules have additional features/arguments that are only applied when the corresponding plugin is installed.

We actively test the modules against the latest stable Foreman release and the matching set of plugins.

Supported Ansible Versions

The supported Ansible versions are aligned with currently maintained Ansible versions that support Collections (2.9+). You can find the list of maintained Ansible versions here.

Supported Python Versions

Ansible only supports Python 2.7 and 3.5 (and higher). These are also the only Python versions we develop and test the modules against.

Known issues

Installation

There are currently two ways to use the modules in your setup: install directly from Ansible Galaxy or via packages.

Installation from Ansible Galaxy

You can install the collection from Ansible Galaxy by running ansible-galaxy collection install theforeman.foreman.

After the installation, the modules are available as theforeman.foreman.<module_name>. Please see the Using Ansible collections documentation for further details.

Installation via packages

The collection is also available as ansible-collection-theforeman-foreman from the plugins repository on yum.theforeman.org for Enterprise Linux systems and from the plugins repository on deb.theforeman.org for Debian and Ubuntu systems.

After installing the package, you can use the modules in the same way as when they are installed directly from Ansible Galaxy.

Installation From Source

For development or testing purposes, you can install the collection from source git repository. For production usage, see the instructions above on installing the latest stable release.

Installation from Github Repository

With Ansible >= 2.10, you can install from a Github repository (such as this one or your fork):

$ ansible-galaxy collection install git+https://github.com/theforeman/foreman-ansible-modules.git

If you have configured GitHub to use SSH instead of HTTPS, you can do:

$ ansible-galaxy collection install git@github.com/theforeman/foreman-ansible-modules.git

You can also specify a branch to use such as devel (below) or a feature branch that you are working with:

$ ansible-galaxy collection install git+https://github.com/theforeman/foreman-ansible-modules.git,devel

To install from a requirements.yml file (useful when installing multiple collections) add a snippet to your requirements.yml like

---
collections:
  - name: https://github.com/theforeman/foreman-ansible-modules.git
    type: git
    version: devel

And install all specified requirements with ansible-galaxy install -r requirements.yml

Building and Installing the Collection Locally

For all currently supported versions of Ansible (i.e. Ansible >= 2.9, and particularly Ansible < 2.10 where the above approach is not yet supported), you can build the collection locally:

$ make dist

And install it with:

$ ansible-galaxy collection install ./theforeman-foreman-*.tar.gz

Dependencies

These dependencies are required for the Ansible controller, not the Foreman server.

Foreman Ansible Roles

Roles using the Foreman Ansible Modules to configure Foreman and its plugins.

Documentation

For individual role documentation, check the README defined at roles/rolename/README.md.

Common Role Variables