Book Image

Salt Cookbook

By : Anirban Saha
Book Image

Salt Cookbook

By: Anirban Saha

Overview of this book

Table of Contents (18 chapters)
Salt Cookbook
About the Author
About the Reviewer

Apache web server packages and services

Apache web server is one of the most widely used web server software packages that supports a wide range of back ends, such as Ruby, and Python-based frameworks. It can serve a wide range of dynamic and static pages and applications. In this recipe, we will learn how to configure Apache web server packages and services.

How to do it...

  1. Configure a new minion called salt-minion-ubuntu as having the Ubuntu server operating system in the development environment.

  2. Create a new state directory in the development environment called apache.

  3. Create and edit /opt/salt-cookbook/development/apache/init.sls to have the following entries:

        - pkgs:
          - apache2
        - name: apache2
        - running
        - enable: True
        - require:
          - pkg: apache_packages
  4. Apply the state to the minion, using the following command:

    [root@salt-master ~]# salt 'salt-minion-ubuntu' state.sls apache saltenv=development