Skip to content

Ansible playbooks to deploy theforeman.org using foreman-ansible-modules

Notifications You must be signed in to change notification settings

LOXDA/ansible-foreman

Repository files navigation

TFM FOREMAN

One tool to deploy the stack

  +---------------------+
  |      App (code)     |
~~+---------------------+~~
  |  Operating System   |
  +---------------------+
  |      (Virtual)      |
~~+---------------------+~~
  |      Physical       |
  +---------------------+

Ansible repo to provision an instance of theforeman with predefined set of parameters

Setup deployement:

Using a working python3 environnement, or activate a virtualenv.
pip3 install -r ./requirement.txt
ansible-galaxy install -r roles/requirements.yml
#export ANSIBLE_COLLECTIONS_PATH=./collections

Run examples:

# prepare
export ANSIBLE_VAULT_PASSWORD_FILE=.vaultpass
ansible-playbook -i inventory/lab playbooks/dns.yml
# deploy whole
ansible-playbook -i inventory/lab playbooks/foreman_deploy.yml --tags tfm,fixdhcp
# deploy individual parts
ansible-playbook -i inventory/lab playbooks/foreman_puppet.yml --tags tfm,puppet
ansible-playbook -i inventory/lab playbooks/foreman_db.yml --tags tfm,db
ansible-playbook -i inventory/lab playbooks/foreman_app.yml --tags tfm,app
ansible-playbook -i inventory/lab playbooks/foreman_proxy.yml --tags tfm,proxy
# provisioning
ansible-playbook -i inventory/lab playbooks/foreman_deploy.yml --tags provisioning

Parameters are defined at inventory/group level. Be sure to maps your instances to group in inventory Rename files in host_vars accordingly. Keep your inventory as tidy as possible.

Some macro views:

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_db.yml

foreman_db svg

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_puppet.yml

foreman_puppet svg

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_app.yml

foreman_app svg

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_proxy.yml --tags fixdhcp

foreman_proxy svg

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_provisioning.yml --tags provisioning

foreman_provisioning svg

ansible-playbook-grapher -vvvvvv --include-role-tasks -i inventory/mgmt playbooks/foreman_deploy.yml --tags tfm,fixdhcp,provisioning

foreman_deploy svg

Requirements

see requirement.txt

About

Ansible playbooks to deploy theforeman.org using foreman-ansible-modules

Topics

Resources

Stars

Watchers

Forks

Languages