GithubHelp home page GithubHelp logo

alexxnica / foreman-ansible Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adfinis/foreman-ansible

0.0 1.0 0.0 50 KB

Ansible playbook to deploy a complete Foreman instance within minutes.

License: GNU General Public License v3.0

foreman-ansible's Introduction

Foreman Ansible Playbook

Travis License

Ansible playbook to deploy a complete up and running Foreman instance within minutes.

Features

The goal of this playbook is to offer a fully automated way to deploy a complete and ready-to-use Foreman instance within minutes.

It contains multiple different roles with numerous customizable variables, which provide the following features:

  • setup database (SQLite or MySQL)
  • setup webserver (plain nginx as a proxy or nginx-passenger)
  • setup isc-dhcp-server
  • setup TFTP server
  • setup foreman-proxy
  • setup Foreman including configuration (templates, hosts, domains, etc.)

None of the roles will install Puppet or use the official foreman-installer, instead the plain Foreman packages are used!

In addition this playbook makes use of foreman-yml to automatically configure Foreman through the API based on a YAML file, which includes adding all templates, OS, media, hosts, etc. and linking them accordingly.

Please note that at the current time the following distributions are supported:

  • Debian 7 & 8
  • Ubuntu 14.04 & 16.04
  • CentOS 6 & 7
  • Red Hat Enterprise Linux 6 & 7

Requirements

The target machine should fulfill the following requirements before the playbook is applied:

  • FQDN configured
  • SELinux disabled
  • Required ports 67, 69, 80, 443, etc. open
  • Internet and repository access (e.g. Red Hat Optional repository)

Ansible 2.0+ is required to use this playbook!

Installation

Below the required steps to execute the default playbook:

  1. Clone this repository
  2. Initialize the submodules containing the foreman-yml repository: :

    $ git submodule update --init
  3. Install and configure Ansible to manage the target server
  4. Create an inventory file containing either the hostname or IP address of target machine: :

    $ echo "$TARGET_IP" > /tmp/inventory
  5. Use the playbook foreman.yml to deploy a default setup with MySQL, nginx-passenger, TFTP, DHCP and foreman-proxy: :

    $ ansible-playbook foreman.yml -i /tmp/inventory -u root
  6. After a successful deployment you should be able to access Foreman through http://$TARGET_IP/.

The password of the admin user is by default set to foreman. In addition safemode_render is changed to false.

Examples

The templates directory contains example foreman-yml YAML templates to give you a head start to bootstrap Foreman.

In addition the variables overwritten in vars/example.yml are the minimum amount of variables that need to be defined, e.g. the MySQL role does not create any users or databases by default.

Roles

Below a short overview of all included roles:

Name Description
common update apt cache
foreman add repos and install Foreman
foreman_proxy add repos, install and configure foreman-proxy
foreman_yml configure the Foreman instance with foreman-yml
isc_dhcp_server install and configure isc-dhcp-server
mysql install MySQL, create users and databases
nginx add upstream repos if requested and setup nginx
passenger_nginx add repos and setup passenger-nginx
sqlite install sqlite and create db directory
tftp install and setup TFTP including PXE boot files

Upcoming features

See the issues page for a list of upcoming and planned features.

Contributions

Contributions are more than welcome! Please feel free to open new issues or pull requests.

License

GNU GENERAL PUBLIC LICENSE Version 3

See the LICENSE file.

foreman-ansible's People

Contributors

karras 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.