-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e5fb1f
commit 65ae76e
Showing
9 changed files
with
110 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
echo | ||
echo " ********************************************************" | ||
echo " * This server is configured using Ansible." | ||
echo " * To change configuration, modify the playbooks vars in" | ||
echo " * /root/server-playbooks, and re-run the play." | ||
echo " * " | ||
echo " * See https://github.com/fourkitchens/server-playbooks" | ||
echo " ********************************************************" | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
|
||
# Script for running the play on the localhost, everything included. | ||
ansible-playbook -c local --tags="common" ./setup.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
## | ||
# Ansible playbook for setting up a LAMP development server on Ubuntu 10.04. | ||
# | ||
|
||
--- | ||
- hosts: all | ||
user: root | ||
|
||
vars_files: | ||
- settings.yml | ||
|
||
tasks: | ||
## | ||
# Apt package installation of required software. | ||
# | ||
- name: Install required packages. | ||
action: apt pkg=$item state=installed | ||
tags: common | ||
with_items: | ||
- php5 | ||
- apache2 | ||
- mysql-server | ||
- mysql-client | ||
- php5-mysql | ||
- php5-xmlrpc | ||
- php-soap | ||
- php5-gd | ||
- sendmail | ||
- unzip | ||
- python-mysqldb | ||
|
||
## | ||
# Message of the day explaining server is under Ansible control. | ||
# | ||
- name: Message of the day explaining server is under Ansible control. | ||
action: copy src=files/etc-update-motd-d-95-ansible dest=/etc/update-motd.d/95-ansible mode=755 | ||
tags: common | ||
|
||
## | ||
# Restart services | ||
# | ||
- name: Restart Apache | ||
action: service name=apache2 state=restarted | ||
tags: common | ||
|
||
- name: Restart MySQL | ||
action: service name=mysql state=restarted | ||
tags: common | ||
|
||
- name: Restart vsftpd | ||
action: service name=vsftpd state=restarted | ||
tags: ftp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Settings that are applied to the templates. This file should be copied to | ||
# the base folder of the play and renamed settings.yml, then modified to suit | ||
# your needs. | ||
|
||
--- | ||
# Hostname is important as we need to delete an anonymous MySQL | ||
# user that is created with this name, make sure you match this | ||
# up with the output of the command 'hostname' on the server. | ||
server_hostname: 'example' | ||
|
||
# php.ini | ||
php_max_execution_time: '90' | ||
php_display_errors: 'On' | ||
php_display_startup_errors: 'On' | ||
php_html_errors: 'On' | ||
php_post_max_size: '32M' | ||
php_upload_max_filesize: '32M' | ||
php_date_timezone: 'US/Central' | ||
|
||
# my.cnf | ||
mysql_max_allowed_packet: '128M' | ||
mysql_character_set_server: 'utf8' | ||
mysql_collation_server: 'utf8_general_ci' | ||
|
||
# mysql | ||
mysql_root_password: 'password' | ||
|
||
# apache | ||
apache_server_admin: '[email protected]' | ||
apache_server_alias: '*.*.example.com' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
#!/bin/sh | ||
|
||
echo | ||
echo " ******************************************************" | ||
echo " ********************************************************" | ||
echo " * This server is configured using Ansible." | ||
echo " * To change configuration, modify the playbooks in" | ||
echo " * /root/server-playbooks, and re-run them." | ||
echo " ******************************************************" | ||
echo " * To change configuration, modify the playbooks vars in" | ||
echo " * /root/server-playbooks, and re-run the play." | ||
echo " * " | ||
echo " * See https://github.com/fourkitchens/server-playbooks" | ||
echo " ********************************************************" | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters