In Chapter 1, Building a Standard Operating Environment on Linux, we discussed the importance of commonality in SOE environments. Now that we are actually looking at the build process itself, this comes back to the fore as we are, for the first time, looking at how to actually implement commonality. Assuming Ansible is your tool of choice, consider the following task. We are writing playbooks for our image build process and have decided that our standard image is to synchronize its time with our local time server. Suppose that our base operating system of choice is Ubuntu 16.04 LTS for historic reasons.
Let's create a simple role to ensure NTP is installed and to copy across our corporate standard ntp.conf, which includes the addresses of our in-house time servers. Finally, we need to restart NTP to pick up the changes.