Created
December 17, 2013 13:17
-
-
Save kulikov/8004747 to your computer and use it in GitHub Desktop.
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
--- | |
- name: install supervisord | |
apt: pkg=supervisor state=present | |
- name: add nsq group | |
group: name=nsq | |
- name: add nsq user | |
user: name=nsq group=nsq | |
- name: Make sure /etc/security/limits.conf has high max file descriptors (soft/hard) | |
lineinfile: name=/etc/security/limits.conf regexp=^nsq line='nsq - nofile 999999' | |
- name: Make sure /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive contain pam_limits.so | |
lineinfile: name={{ item }} regexp='pam_limits.so' line='session required pam_limits.so' | |
with_items: | |
- /etc/pam.d/common-session | |
- /etc/pam.d/common-session-noninteractive | |
- name: setup data directory | |
file: path=/mnt/nsq/ owner=nsq group=nsq recurse=true state=directory | |
- name: setup log directory | |
file: path=/var/log/nsq state=directory | |
- name: download nsq binary release | |
get_url: > | |
url=https://s3.amazonaws.com/bitly-downloads/nsq/nsq-{{ version }}.linux-amd64.go1.2.tar.gz | |
dest=/tmp/nsq-{{ version }}.tar.gz | |
- name: extract archive | |
command: tar -xvzf /tmp/nsq-{{ version }}.tar.gz -C /tmp/ | |
- name: remove old release | |
command: rm -rf /var/nsq | |
- name: move files to /var/nsq/ | |
command: mv /tmp/nsq-{{ version }}.linux-amd64.go1.2 /var/nsq | |
- name: Add nsqd config for supervisord | |
template: src=nsqd.conf dest=/etc/supervisor/conf.d/nsq.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment