Giter Site home page Giter Site logo

wzzrd / foreman-ansible-modules Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theforeman/foreman-ansible-modules

0.0 1.0 0.0 2.03 MB

Repository for Ansible modules that communicate with Foreman and plugin APIs

License: GNU General Public License v3.0

Makefile 0.71% Python 99.09% HTML 0.20%

foreman-ansible-modules's Introduction

Foreman Ansible Modules Build Status

This repository contains Ansible modules for interacting with a Foreman server API and various plugin APIs such as Katello.

Goals

The intent of this repository is to be a place that community members can develop or contribute modules. The goals of this repository are:

How To Use The Repository

The following is an example of how you could use this repository in your own environment. Let's assume you have a directory of playbooks and roles in a git repository for your infrastructure named infra:

infra/
├── playbooks
└── roles

First, clone this repository into infra/:

cd infra/
git clone https://github.com/theforeman/foreman-ansible-modules.git

Note the ansible.cfg file cloned with foreman-ansible-modules. The ansible.cfg needs to be in your current directory when you run ansible or ansible-playbook. You can copy it to another location or add it to your current ansible configuration; make sure to update the relative paths to the foreman-ansible-module modules and module_utils if you do so.

Now your playbooks and roles should have access to the modules and module_utils contained in the repository for use, testing, or development of new modules.

How to test modules in this repository

To test, you need a running instance of Foreman, probably with Katello (use forklift if unsure). Also you need to run test-setup and update test/test_playbooks/server_vars.yml:

make test-setup
vi test/test_playbooks/server_vars.yml # point to your Foreman instance

To run the tests:

make test # all tests
make test_product  # single test
make test TEST="-k 'organzation or product'"  # select tests by expression (see `pytest -h`)

The tests are run against prerecorded server-responses. You can (re-)record the cassettes for a specific test with

make record_<test name>

See also Guidedeline to writing tests.

How to debug modules in this repository

Set up debugging using ansible's test-module

make debug-setup

Debug with ansible's test-module

make debug MODULE=<module name>

# Example: debug the katello_content_view module
$ make debug MODULE=katello_content_view
./.tmp/ansible/hacking/test-module -m modules/katello_content_view.py -a @test/data/content-view.json -D /usr/lib64/python2.7/pdb.py
...

You can set a number of environment variables besides MODULE to configure make. Check the Makefile for more configuration options.

Modules List

This is a list of modules currently in the repository (please add to the list if adding a module).

Entity Modules

  • foreman_global_parameter: create and maintain global parameters
  • foreman_operating_system: create and maintain operating systems
  • foreman_os_default_template: create and maintain the association of default templates to operating systems
  • foreman_organization: create and maintain organizations
  • foreman_location: create and maintain locations
  • foreman_ptable: create and maintain partition templates
  • foreman_provisioning_template: create and maintain provisioning templates
  • foreman_compute_resource: create and maintain compute resources
  • foreman_domain: create and maintain domains
  • foreman_subnet: create and maintain subnets
  • foreman_environment: create and maintain environments (puppet)
  • foreman_job_template: create and maintain job templates and associated template inputs
  • foreman_setting: set and reset settings
  • katello_content_credential: create and maintain content credentials
  • katello_product: create and maintain products
  • katello_repository: create and maintain repositories
  • katello_content_view: create and maintain content views
  • katello_sync_plan: create and maintain sync plans
  • katello_activation_key: create and maintain activation keys
  • redhat_manifest: create and maintain manifests

Action Modules

  • katello_sync: sync Katello repositories and products
  • katello_upload: upload files, rpms, etc. to repositories. Note, rpms & files are idempotent.
  • katello_content_view_publish: publish Katello content views
  • katello_manifest: upload and Manage Katello manifests

Nailgun Versions

Below is listed the correct Nailgun branch for your Server

Server Nailgun branch
Katello master
Satellite 6.3 6.3.z
Satellite 6.2 6.2.z

Ansible Version

Please note that you need ansible >= 2.3 to use these modules.

foreman-ansible-modules's People

Contributors

akofink avatar bagasse avatar bkearney avatar claudiol avatar ehelms avatar ephracis avatar evgeni avatar gregswift avatar ismaelpuerto avatar m-bucher avatar manuelbonk avatar pcreech avatar philippj avatar sbernhard avatar sean797 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.