Apache22 Playbook


Description


Apache22 install playbook

playbook構成

  • files
  • handlers
  • tasks
  • template


files


  • vhost_80.conf (sample)
  • vhost_443.conf (sample)


handlers


Restart httpd systemd restart httpd


tasks


task name main
path common_roles/apache22/tasks/main.yml
tags httpd

task list

  • Install Apache
  • Configure httpd.conf
  • Configure virtual host
  • Start Apache


templates


  • httpd.conf.j2


vars


httpd_installs
インストールパッケージの定義

Vars Name httpd_installs
valu Package Name
default httpd
httpd-tools
mod_ssl
cronolog

example:

httpd_installs:
  - httpd
  - httpd-tools
  - mod_ssl
  - cronolog

httpd_timeout
httpd.confに定義するタイムアウト値

Vars Name httpd_timeout
valu time(s)
default 60(s)

example:

httpd_timeout: 60

httpd_serverlimit
httpd.confに定義するpreforkのserverlimit値

Vars Name httpd_serverlimit
valu number
default 256

example:

httpd_serverlimit: 256

httpd_maxclients
httpd.confに定義するpreforkのmaxclient値

Vars Name httpd_maxclients
valu number
default 256

example:

httpd_maxclients: 256

httpd_listen

httpd.confに定義するlistenポート値

Vars Name httpd_listen
valu number
default 80
443

example:

httpd_listen:
  - '80'
  - '443'

httpd_include
httpd.confのincludeに定義する外部読み込みファイルの定義

Vars Name httpd_include
valu filename
default vhost_80.conf
vhost_443.conf

example:

httpd_include:
  - vhost_80.conf
  - vhost_443.conf

httpd_user
apache起動のユーザー定義

Vars Name httpd_user
valu username
default apache

example:

httpd_user: apache

httpd_group
apache起動のグループ定義

Vars Name httpd_group
valu groupname
default apache

example:

httpd_group: apache

httpd_directoryindex

httpd.confに定義するdirectoryindexの値

Vars Name httpd_directoryindex
valu filetype
default index.html index.php

example:

httpd_directoryindex: 'index.html index.php'

httpd_default_charset
httpd.confに定義するdefaultcharesetの値

Vars Name httpd_default_charset
valu charaset / off
default Off

example:

httpd_default_charset: 'Off'

http_health_dir
ヘルスチェック用ディレクトリの指定

Vars Name http_health_dir
valu directory path
default /data/htdocs/health

example:

http_health_dir: /data/htdocs/health

httpd_auth

Vars Name httpd_aut
valu other
dir default /data/htdocs/opt
user default admin
pass default @dmin

example:

httpd_auth:
    dir: '/data/htdocs/opt'
    user: 'admin'
    pass: '@dmin'

httpd_health_allow
ヘルスチェック参照許可IPの指定

Vars Name httpd_health_allow
valu ip address
default 127.0.0.1

example:

httpd_health_allow:
  - 127.0.0.1

results matching ""

    No results matching ""