Skip to content

Commit

Permalink
renamed repository
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinkim committed Aug 16, 2014
1 parent d6c72d8 commit 57def7a
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ install:
- ansible-galaxy install franklinkim.openssl
script:
- echo localhost > inventory
- ln -s ansible-role-apache2 ../franklinkim.apache2
- ln -s ansible-apache2 ../franklinkim.apache2
- ansible-playbook --syntax-check -i inventory test.yml
- ansible-playbook -i inventory test.yml --connection=local --sudo -vvvv
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Ansible Apache2 Role

[![Build Status](https://travis-ci.org/weareinteractive/ansible-role-apache2.png?branch=master)](https://travis-ci.org/weareinteractive/ansible-role-apache2)
[![Stories in Ready](https://badge.waffle.io/weareinteractive/ansible-role-apache2.svg?label=ready&title=Ready)](http://waffle.io/weareinteractive/ansible-role-apache2)
[![Build Status](https://travis-ci.org/weareinteractive/ansible-apache2.png?branch=master)](https://travis-ci.org/weareinteractive/ansible-apache2)
[![Stories in Ready](https://badge.waffle.io/weareinteractive/ansible-apache2.svg?label=ready&title=Ready)](http://waffle.io/weareinteractive/ansible-apache2)

> `apache2` is an [ansible](http://www.ansible.com) role which:
>
> * installs apache2
> * configures apache2
> * configures `/var/www`
> * enables/disables confs
> * enables/disables sites
> * enables/disables modules
Expand All @@ -30,7 +29,7 @@ $ arm install franklinkim.apache2
Using `git`:

```
$ git clone https://github.com/weareinteractive/ansible-role-apache2.git
$ git clone https://github.com/weareinteractive/ansible-apache2.git
```

## Variables
Expand All @@ -57,12 +56,6 @@ apache2_modules: []
apache2_confs: []
# enabled/disabled sites
apache2_sites: []
# www dir owner name
apache2_wwww_dir_owner: root
# www dir group name
apache2_wwww_dir_group: root
# www dir mode
apache2_wwww_dir_mode: 0775
# remove the default host
apache2_remove_default: yes
# start on boot
Expand All @@ -71,6 +64,11 @@ apache2_service_enabled: yes
apache2_service_state: started
```

## Handlers

* `reload apache2`
* `restart apache2`

## Example playbook

```
Expand All @@ -87,15 +85,13 @@ apache2_service_state: started
- { id: mime, state: present }
- { id: headers, state: present }
- { id: rewrite, state: present }
apache2_wwww_dir_group: staff
apache2_wwww_dir_mode: 4775
```

## Testing

```
$ git clone https://github.com/weareinteractive/ansible-role-apache2.git
$ cd ansible-role-apache2
$ git clone https://github.com/weareinteractive/ansible-apache2.git
$ cd ansible-apache2
$ vagrant up
```

Expand Down
6 changes: 0 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ apache2_modules: []
apache2_confs: []
# enabled/disabled sites
apache2_sites: []
# www dir owner name
apache2_wwww_dir_owner: root
# www dir group name
apache2_wwww_dir_group: root
# www dir mode
apache2_wwww_dir_mode: 0775
# remove the default host
apache2_remove_default: yes
# start on boot
Expand Down
10 changes: 0 additions & 10 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,3 @@
- web
- apache2

- name: Setting file permissions
file: >
path=/var/www
state=directory
owner={{ apache2_wwww_dir_owner }}
group={{ apache2_wwww_dir_group }}
mode={{ apache2_wwww_dir_mode }}
tags:
- web
- apache2
2 changes: 0 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
tags:
- web
- apache2


1 change: 0 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- include: configure.yml
- include: rules.yml
- include: remove_default.yml
when: apache2_remove_default
- include: manage_confs.yml
- include: manage_sites.yml
- include: manage_modules.yml
Expand Down
2 changes: 1 addition & 1 deletion tasks/manage_sites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
command: >
a2ensite {{ item.id }}
creates=/etc/apache2/sites-enabled/{{ item.id }}.conf
when: item.state is not defined or item.state != 'absent'
when: item.state is not defined or item.state == 'present'
with_items: apache2_sites
notify: reload apache2
tags:
Expand Down
11 changes: 3 additions & 8 deletions tasks/remove_default.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
---

- name: Removing default files
file: >
dest=/var/www/html
state=absent
tags:
- web
- apache2

- name: Disabling default host
file: >
dest=/etc/apache2/sites-enabled/000-default.conf
state=absent
notify: reload apache2
when: apache2_remove_default
tags:
- web
- apache2
Expand All @@ -21,6 +14,7 @@
file: >
dest=/etc/apache2/sites-available/000-default.conf
state=absent
when: apache2_remove_default
tags:
- web
- apache2
Expand All @@ -29,6 +23,7 @@
file: >
dest=/etc/apache2/sites-available/default-ssl.conf
state=absent
when: apache2_remove_default
tags:
- web
- apache2
38 changes: 0 additions & 38 deletions templates/etc-apache2-sites-available-default.j2

This file was deleted.

0 comments on commit 57def7a

Please sign in to comment.