-
Notifications
You must be signed in to change notification settings - Fork 33
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
Nginx: add nginx to shell server #53
Conversation
ansible/tasks/nginx/main.yml
Outdated
path: /etc/nginx/sites-enabled/default | ||
|
||
- name: Restart nginx | ||
when: nginxconf.chnaged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a typo here.
- name: Remove default nginx site | ||
file: | ||
state: absent | ||
path: /etc/nginx/sites-enabled/default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also remove /etc/nginx/sites-available/default ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/etc/nginx/sites-available/default is src of this symlink. there is no point to remove the original copy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
@mayli why not use the nginx provided from Debian? |
state: absent | ||
path: /etc/nginx/sites-enabled/default | ||
|
||
- name: Restart nginx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to make this optional so that it doesn't fail if systemd isn't running (for instance, when setting up a build with Docker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ought to be a handler, but that would depend on #68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, the only feedback I had isn't actionable right now.
- name: Remove default nginx site | ||
file: | ||
state: absent | ||
path: /etc/nginx/sites-enabled/default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
state: absent | ||
path: /etc/nginx/sites-enabled/default | ||
|
||
- name: Restart nginx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ought to be a handler, but that would depend on #68
as a reverse proxy of ~/.nginx.sock