2015-11-12 04:14:03 +00:00
|
|
|
- get_url: url=https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
|
|
|
|
dest=/etc/yum.repos.d/passenger.repo
|
|
|
|
sudo: yes
|
|
|
|
- rpm_key: key=https://packagecloud.io/gpg.key
|
|
|
|
sudo: yes
|
|
|
|
|
|
|
|
# this makecache is mostly because I can not find any other way to fully
|
|
|
|
# import the GPG. key for the Passenger repo. 'rpm --import' is not
|
|
|
|
# sufficient.
|
|
|
|
- command: yum -q makecache -y --disablerepo='*' --enablerepo='passenger*'
|
|
|
|
sudo: yes
|
|
|
|
changed_when: False
|
|
|
|
|
|
|
|
- yum: name=epel-release
|
|
|
|
sudo: yes
|
|
|
|
|
2015-11-18 23:02:49 +00:00
|
|
|
- name: install nginx, passenger
|
|
|
|
yum: name='{{ item }}'
|
2015-11-12 04:14:03 +00:00
|
|
|
sudo: yes
|
|
|
|
with_items:
|
|
|
|
- nginx
|
|
|
|
- passenger
|
|
|
|
|
2015-11-22 02:43:47 +00:00
|
|
|
- template: dest='/etc/nginx/conf.d/{{ ansible_fqdn }}.conf'
|
|
|
|
src=nginx.conf.j2
|
2015-11-12 04:14:03 +00:00
|
|
|
sudo: yes
|
|
|
|
notify: restart nginx
|
|
|
|
|
|
|
|
- template: dest=/etc/nginx/conf.d/passenger.conf
|
|
|
|
src=passenger.conf.j2
|
|
|
|
sudo: yes
|
|
|
|
notify: restart nginx
|
|
|
|
|
2015-11-22 02:43:47 +00:00
|
|
|
- copy: dest='/etc/pki/tls/certs/{{ ansible_fqdn }}.pem'
|
|
|
|
src='{{ nginx_pem }}'
|
|
|
|
sudo: yes
|
|
|
|
notify: restart nginx
|
|
|
|
|
2015-11-12 04:14:03 +00:00
|
|
|
- service: name=nginx
|
|
|
|
state=started
|
|
|
|
sudo: yes
|