September 2018
Beginner to intermediate
214 pages
5h 53m
English
This use case automates a task that is usually carried out by system administrators manually. Using the following playbook, we are going to set up a LAMP server, which is basically a web server, Apache2; a content manager PHP; and a database manager, MySQL server. We will also add some plugins and configuration that adhere to best practice standards. The following script only works with the Debian Linux family:
--- - name: Install a LAMP on Linux hosts hosts: webservers become: yes gather_facts: yes tasks: - name: Install Lamp packages apt: name: '{{ item }}' state: latest update_cache: yes with_items: - apache2 - mysql-server - php - libapache2-mod-php - python-mysqldb - name: Create the Apache2 ...Read now
Unlock full access