Skip to content

Add debian support #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ nginx_www_dir: "/srv/www"
nginx_log_dir: "/var/log/nginx"
nginx_pid: "/var/run/nginx.pid"

# package
nginx_base_repo_url: http://nginx.org/packages
nginx_state_package: present
nginx_state_key: present

# nginx.conf
nginx_worker_processes: 4
Expand Down
14 changes: 7 additions & 7 deletions tasks/package.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# file: nginx/tasks/package.yml

- name: Nginx | Make sure the ansible required dependencies are installed
apt:
pkg: python-pycurl
state: present
- name: Nginx | Add the nginx key
apt_key: url=http://nginx.org/keys/nginx_signing.key state={{nginx_state_key}}

- name: Nginx | Add the repository
apt_repository: repo='deb {{nginx_base_repo_url}}/{{ansible_os_family|lower}}/ {{ansible_lsb.codename}} nginx' state={{nginx_state_package}} update_cache=no

- name: Nginx | Add the nginx repository
apt_repository:
repo: ppa:nginx/stable
- name: Nginx | Add the src repository
apt_repository: repo='deb-src {{nginx_base_repo_url}}/{{ansible_os_family|lower}}/ {{ansible_lsb.codename}} nginx' state={{nginx_state_package}} update_cache=yes

- name: Nginx | Make sure nginx is installed (package)
apt:
Expand Down