You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
Mike Crosson 318c7eb4cd Added licencing 5 years ago
defaults Added warning to README for failure condition, cleaned up seed file, added some options to defaults, improved reliability of tasks and added more smarts to them 5 years ago
handlers Initial import 5 years ago
tasks Fixup mountpoint for image import; allow /dev/sd* and /dev/disk/by-id disk names in seed 5 years ago
templates Fixup mountpoint for image import; allow /dev/sd* and /dev/disk/by-id disk names in seed 5 years ago
LICENSE-APACHE-2.0.txt Added licencing 5 years ago
LICENSE-CC-BY-SA-3.0.html Added licencing 5 years ago
README.md Added licencing 5 years ago
bootstrap_lan.yml Minor tweak for variable loading 5 years ago
playbook_cobbler_register_host.yml Added playbook illustrating how to register a host in a quick and dirty fashion 5 years ago

README.md

General Info

This Ansible role is meant to configure Cobbler on a given server.

This role also includes a playbook and supporting files to roll out the first host in a Lab/LAN. See the bootstrap_lan.yml file for an automated LAN deployment process. The playbook should be able to run "as-is" after Vagrant, VirtualBox and Ansible are installed on a host machine.

Cobbler

Cobbler is used to provision new bare metal servers. It's a pretty straight forward provisioning platform but it does require a server components. There are a number of Ansible playbooks related to Cobbler to help manage the system and to deploy new systems.

Cobbler documentation can be found at: http://www.cobblerd.org/

Warning

WARNING: If the disk isn't paritioned correctly, ensure the disk you're using is at least as large as the minimum's specified in the seed file. If the disks are smaller, it'll partition wrong and fail.

Tips/Tricks

You can generated a crypted password by running the following command

openssl passwd -1

Various commands that are helpful for verifying state of Cobbler and what is registered

cobbler check # Error re reposync is OK (consider running it on a production system -- too big for bootstrap VM)
cobbler distro list
cobbler distro report --name ubuntu1404-x86_64
cobbler profile report --name ubuntu1404-x86_64

Generate iso(s) for boot If you receive a failure at boot: press tab and then enter the right boot profile and press enter

cobbler buildiso --profiles="profile1 profile2 profile3"
cobbler buildiso --systems="system1 system2 system3"
cobbler buildiso --standalone --distro="distro1"

Register a new system

cobbler system add --name=[ansible-name] --profile=ubuntu1404-x86_64 \
  --interface=mgmt --management=1 --mac=[mgmt nic MAC] --ip-address=[mgmt subnet] --netmask=255.255.255.0 --gateway=[mgmt gw] --static=1
  --hostname=[fqdn] --name-servers=[mgmt dns] --name-servers-search=[dns search] \
  --ksmeta="disk1=/dev/disk/by-id/ata-disk1 disk2=/dev/disk/by-id/ata-disk2"

View a KickStarter file

cobbler system getks --name=[some system name]

Vagrant

Vagrant is used for boot strapping (see bootstrap Ansible role) the first server in a Lab environment / new LAN. It's automated using an Ansible playbook. The rough process is:

  1. Spin up new Vagrant VirtualBox VM
  2. Setup VM to run temporary Cobbler instance
  3. Use custom Ansible playbook to deploy Cobbler in the Vagrant VM
  4. Use temporary Cobbler instance to deploy the first host in a lab / LAN
  5. Configure first server using standard Ansible playbooks / roles including base Cobbler install

Vagrant documentation can be fount at: https://docs.vagrantup.com/v2/

Tips/Tricks

You only need a Vagrant file in a directory to start working with Vagrant. It's a very simple/straight forward system and the docs have clear information on how to use the Vagrantfile contained within this repo.

A couple useful commands

vagrant up --provider virtualbox
vagrant up --provider vmware_fusion

You can run Ansible manually against a Vagrant managed VM. Per the docs

ansible-playbook -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory --private-key=~/.vagrant.d/insecure_private_key -u vagrant playbook.yml

Installing plugins for VMWare

vagrant plugin install vagrant-vmware-fusion
vagrant plugin install vagrant-vmware-workstation

Code License

All code is licensed under the Apache 2 License (http://www.apache.org/licenses/LICENSE-2.0)

Non-Code License

All non-code Assets, documentation, etc is licensed under the Creative Commons Attribution-ShareAlike 3.0 license (https://creativecommons.org/licenses/by-sa/3.0/us/)