Skip to content

imranansari/httpd

 
 

Repository files navigation

httpd

License Build Status

Platform

Project Stats

Ansible role to setup the Apache HTTP server.

Currently only the package installation is tested and working properly.

The source installation currently has a problem when building the code.

Tests

Family Distribution Version Test Status
Debian Debian Jessie x86_64
Debian Debian Wheezy x86_64
Debian Ubuntu Yakkety x86_64
Debian Ubuntu Xenial x86_64
Debian Ubuntu Wily x86_64
Debian Ubuntu Trusty x86_64
Debian Ubuntu Precise x86_64

Requirements

  • ansible >= 2.0

Role Variables

  • debug: flag to run debug tasks.
  • httpd_conf: configuration settings for {{ httpd_dir_configuration }}/conf-{available|enabled}.
  • httpd_configuration: contents of the {{ httpd_dir_configuration }}/httpd.conf file.
  • httpd_default: contents of /etc/default/{{ httpd_service }}.
  • httpd_dir_cache: directory for apache cache.
  • httpd_dir_configuration: directory for apache configuration.
  • httpd_dir_install: directory where apache will be installed.
  • httpd_dir_lib: directory where apache modules are located.
  • httpd_dir_lock: directory where apache....
  • httpd_dir_run: directory where apache PID file will be stored.
  • httpd_installation: the installation method: build or package.
  • httpd_modules: list of apache modules.
  • httpd_modules_dynamic: list of dynamically linked apache modules.
  • httpd_modules_static: list of statically linked apache modules.
  • httpd_ports: list of ports apache will be listening to.
  • httpd_service: name of the service: apache2 for package installations; httpd otherwise.
  • httpd_sites: list of available sites.
  • httpd_user: user under which apache will be running.
  • httpd_version: the apache version to be installed.

package

Variables specific to the package installation process.

  • httpd_configuration_envvars: configuration for the /etc/apache2/envvars file.

build

Variables specific to the build installation process.

  • httpd_build_dependencies: list of packages needed to build apache.
  • httpd_build_options: option to be passed to configure.
  • httpd_dir: symlink to the enabled apache installation.
  • httpd_dir_source: directory where to build apache.
  • httpd_env: environment variables.
  • httpd_environment: apache environment.
  • httpd_force_build: flag to indicate if a build is to be triggered no matter the server state.
  • httpd_download_url: the URL for the tarball.
  • httpd_download_url_asc: the URL for the tarball PGP signature.
  • httpd_download_url_md5: the URL for the tarball MD5 checksum.
  • httpd_mpm_module: the mpm apache module.
  • httpd_pid_file: path to the apache PID file.
  • httpd_tarball: filename of the tarball.

Dependencies

None.

Playbooks

- hosts: servers
  vars:
    see tests/vars/vagrant.yml

  roles:
     - role: ansiblebit.httpd

Tags

  • configuration: configuration tasks.
  • debug: task to debug role variables.
  • installation: installation tasks.
  • validation: task to validate role variables.

Test

To run the tests you will need to install:

To run all tests against all pre-defined OS/distributions * ansible versions:

$ tox

To run tests for trusty64:

$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# log file will be stores under tests/log

To perform debugging on a specific environment:

$ cd tests
$ vagrant up trusty64.vagrant.dev

# to provision using the test.yml playbook (as many time as you need)
$ vagrant provision trusty64.vagrant.dev

# to access the Vagrant box
$ vagrant ssh trusty64.vagrant.dev

Links

About

Ansible role to setup the Apache HTTP server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 89.3%
  • Ruby 6.2%
  • Python 4.5%