-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to version 3.1.0, add memcached
- Loading branch information
Showing
6 changed files
with
65 additions
and
7 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 |
---|---|---|
|
@@ -6,7 +6,3 @@ | |
mode=0644 | ||
notify: | ||
- reload-iptables | ||
|
||
- debug: trigger reload-iptables | ||
notify: reload-iptables | ||
changed_when: true |
42 changes: 42 additions & 0 deletions
42
cmd/freegeoip/ansible-playbook/roles/memcached/files/memcached.conf
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,42 @@ | ||
# Run memcached as a daemon. This command is implied, and is not needed for the | ||
# daemon to run. See the README.Debian that comes with this package for more | ||
# information. | ||
-d | ||
|
||
# Log memcached's output to /var/log/memcached | ||
logfile /var/log/memcached.log | ||
|
||
# Be verbose | ||
# -v | ||
|
||
# Be even more verbose (print client commands as well) | ||
# -vv | ||
|
||
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default | ||
# Note that the daemon will grow to this size, but does not start out holding this much | ||
# memory | ||
-m 2048 | ||
|
||
# Default connection port is 11211 | ||
-p 11211 | ||
|
||
# Run the daemon as root. The start-memcached will default to running as root if no | ||
This comment has been minimized.
Sorry, something went wrong. |
||
# -u command is present in this config file | ||
-u memcache | ||
|
||
# Specify which IP address to listen on. The default is to listen on all IP addresses | ||
# This parameter is one of the only security measures that memcached has, so make sure | ||
# it's listening on a firewalled interface. | ||
-l 0.0.0.0 | ||
|
||
# Limit the number of simultaneous incoming connections. The daemon default is 1024 | ||
-c 10240 | ||
|
||
# Lock down all paged memory. Consult with the README and homepage before you do this | ||
# -k | ||
|
||
# Return error when memory is exhausted (rather than removing items) | ||
# -M | ||
|
||
# Maximize core file limit | ||
# -r |
2 changes: 2 additions & 0 deletions
2
cmd/freegeoip/ansible-playbook/roles/memcached/handlers/main.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,2 @@ | ||
- name: restart memcached | ||
service: name=memcached state=restarted |
14 changes: 14 additions & 0 deletions
14
cmd/freegeoip/ansible-playbook/roles/memcached/tasks/main.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,14 @@ | ||
- name: Install memcached | ||
apt: name=memcached state=installed | ||
|
||
- name: Write custom memcached.conf | ||
copy: src=memcached.conf | ||
dest=/etc/memcached.conf | ||
owner=root | ||
group=root | ||
mode=0644 | ||
notify: | ||
- restart memcached | ||
|
||
- name: Make sure memcached is running | ||
service: name=memcached state=running |
_readme.txt
#284 [/]
Y