Merge pull request #46 from pgilad/feature/apache-optional-start

Ensure Apache is started should be optional
This commit is contained in:
Jeff Geerling 2015-10-31 21:40:48 -05:00
commit 6e6ea9de50
3 changed files with 9 additions and 2 deletions

View file

@ -80,6 +80,10 @@ The SSL protocols and cipher suites that are used/allowed when clients make secu
The list of packages to be installed. This defaults to a set of platform-specific packages for RedHat or Debian-based systems (see `vars/RedHat.yml` and `vars/Debian.yml` for the default values). The list of packages to be installed. This defaults to a set of platform-specific packages for RedHat or Debian-based systems (see `vars/RedHat.yml` and `vars/Debian.yml` for the default values).
apache_state: started
Set initial apache state. Recommended values: `started` or `stopped`
## Dependencies ## Dependencies
None. None.

View file

@ -33,3 +33,6 @@ apache_mods_enabled:
- rewrite.load - rewrite.load
- ssl.load - ssl.load
apache_mods_disabled: [] apache_mods_disabled: []
# Set initial apache state. Recommended values: `started` or `stopped`
apache_state: started

View file

@ -39,8 +39,8 @@
- include: configure-Debian.yml - include: configure-Debian.yml
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: Ensure Apache is started and enabled on boot. - name: Ensure Apache has selected state and enabled on boot.
service: service:
name: "{{ apache_daemon }}" name: "{{ apache_daemon }}"
state: started state: "{{ apache_state }}"
enabled: yes enabled: yes