mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-08 07:03:28 +01:00
Add compatibility for AmazonLinux.
Ansible identifies AmazonLinux as: ansible_os_family: "RedHat" ansible_distribution_major_version == "NA" But it is seemingly otherwise indistinguishable from RedHat / CentOS. This sets the correct variables for packages, services, etc, which differ from RHEL / CentOS.
This commit is contained in:
parent
9e4be6c2c6
commit
73bd75f4b4
2 changed files with 23 additions and 0 deletions
|
@ -3,6 +3,11 @@
|
|||
- name: Include OS-specific variables.
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
# If AmazonLinuxm include needed variables.
|
||||
- name: Include OS-specific variables.
|
||||
include_vars: "AmazonLinux.yml"
|
||||
when: ansible_distribution == "Amazon" and ansible_distribution_major_version == "NA"
|
||||
|
||||
- name: Define apache_packages.
|
||||
set_fact:
|
||||
apache_packages: "{{ __apache_packages | list }}"
|
||||
|
|
18
vars/AmazonLinux.yml
Normal file
18
vars/AmazonLinux.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
apache_service: httpd
|
||||
apache_daemon: httpd
|
||||
apache_daemon_path: /usr/sbin/
|
||||
apache_server_root: /etc/httpd
|
||||
apache_conf_path: /etc/httpd/conf.d
|
||||
|
||||
apache_vhosts_version: "2.4"
|
||||
|
||||
__apache_packages:
|
||||
- httpd24
|
||||
- httpd24-devel
|
||||
- mod24_ssl
|
||||
- openssh
|
||||
|
||||
apache_ports_configuration_items:
|
||||
- regexp: "^Listen "
|
||||
line: "Listen {{ apache_listen_port }}"
|
Loading…
Reference in a new issue