May 2018
Intermediate to advanced
552 pages
14h 55m
English
Speaking of automating the setup of a web server, why don't we go ahead and do exactly that? It'll be another simple example, but it will serve you well if we demonstrate more of what Ansible can do. We will set up a Playbook to perform the following tasks:
First, let's set up the Playbook to simply install Apache. I called mine apache.yml but the name is arbitrary:
---- hosts: all become: true tasks: - name: Install Apache apt: name=apache2
No surprises here, we've already installed a package at this point. Let's add an additional instruction to have the apache2 service started:
---- hosts: all become: ...