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: Set up authorized_keys for the deploy user | |
authorized_key: user=deploy | |
state=present | |
key="{{ item }}" | |
with_file: | |
- public_keys/lund-joshua | |
- public_keys/smith-john |
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: Echo some things! | |
command: echo {{ item.foo }} {{ item.bar }} | |
with_items: echo_arguments |
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: Set the hostname in rc.conf | |
lineinfile: dest=/etc/rc.conf regexp="^hostname" line='hostname="{{ hostname }}"' | |
register: hostnamestatus | |
- name: Set the hostname | |
command: hostname {{ hostname }} | |
when: hostnamestatus.changed |
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: Check out the latest revision of the codebase and notify the proper handlers if there have been updates | |
git: repo=https://github.com/jlund/imgur-display.git | |
dest={{ imgur_display_location }}/current | |
sudo: yes | |
sudo_user: deploy | |
notify: | |
- Symlink the log directory to the shared location | |
- Install the bundle | |
- Restart the imgur-display application |
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
# Set up log rotation for Nginx and Passenger | |
{% for rotate_target in 'nginx', 'passenger' %} | |
/etc/logrotate.d/{{ rotate_target }}: | |
file.managed: | |
- source: salt://nginx-passenger/{{ rotate_target }}-logrotate | |
- require: | |
- cmd: nginx-install | |
- cmd: passenger | |
{% endfor %} |
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: Set up log rotation for Nginx and Passenger | |
copy: src={{ item }}-logrotate | |
dest=/etc/logrotate.d/{{ item }} | |
with_items: | |
- nginx | |
- passenger |
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
# Run the Nginx install script | |
nginx-install: | |
cmd.script: | |
- name: salt://nginx-passenger/install.sh | |
- unless: /opt/nginx/sbin/nginx -v 2>&1 | grep 1.4.1 | |
- template: jinja | |
- require: | |
- file: nginx-source | |
- cmd: passenger | |
- file: /usr/local/bin/rake |
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
#!/bin/bash | |
cd /usr/local/src/ | |
tar xfj Python-3.3.2.tar.bz2 | |
cd Python-3.3.2 | |
./configure --prefix=/opt/python | |
make | |
make install |