Service Management in Networks - Leischner

Practice sheet 5 - Ansible (1 Point)

In the following we want to provision our homelab server homelab using an ansible playbook.


Task 1 - Git for homelab

Create a git servmgmt-ws18 into which the code of the following practical tasks will be added. Customize the files .gitignore and ansible.cfg appropriately. If you don't always want to type ansible-playbook, set an alias for it, for instance apl .


Task 2 - Playbook: Basic Configuration

Write an ansible playbook ubu-basic-config.yaml that provides an Ubuntu server with a basic configuration. The playbook should make all the configurations that you usually do yourself on a new server using the command line. The result is a server on which further applications can then be installed.


Task 3 -  Playbook: Upgrade

  1. Write an ansible playbook ubu-upgrade.yaml that upgrades hosts picked out from the hosts file.
  2. Test the playbook against homelab with the command
  3.         ansible-playbook ubu-upgrade.yaml --limit homelab -K    .

  4. Why do you need the parameter -K ?


Task 4 -  Playbook: Install virtualbox, vagrant and ansible

  1. Write an ansible playbook homelab-vib-vag-ans.yaml structured in three parts that installs virtualbox, vagrant and ansible. Please pay attention to the following points
    1. Use virtualbox version 5.2. To do this you have to add the repo with the ansible module  apt_repository.
    2. Let Ansible output the installed version after every installation. You can use the module debug for this.
  2. Test the playbook against your homelab server homelab.


Please, submit your git as a zip file to LEA - Lernen und Arbeiten online .


Impressum | Datenschutz |, last modification: 10.06.2019-19.12