Comments (5)
Hi @adrianovieira!
- it creates unrequested
default.conf
$ ls -l /etc/nginx/conf.d/ total 12 -rw-r--r--. 1 root root 1093 Dez 4 13:01 default.conf -rw-r--r--. 1 root root 80 Fev 13 13:46 www1.example.com.conf -rw-r--r--. 1 root root 80 Fev 13 13:49 www2.example.com.conf
This is a known issue, right now the role doesn't delete previous existing configuration files (see #93). We'll prioritize adding this feature.
- it doesn't insert a
root
path$ cat /etc/nginx/conf.d/www2.example.com.conf # Ansible managed server { listen 80; server_name www2.example.com; }
There's no low level root
parameter. You can set a root path by using the html_file_location
parameter at https://github.com/nginxinc/ansible-role-nginx/blob/master/defaults/main.yml#L175. However you make a good point that sometimes you want to use root
in the server context instead of the location context. We'll try to get that parameter added asap too.
from ansible-role-nginx.
Are you pulling from Ansible Galaxy? If so these changes won't be reflected until we publish a new release. For now I'd recommend cloning this repo directly.
from ansible-role-nginx.
Hello,
My name is Grzegorz and I will work with you on solving issue you are facing.
At a first glance it seems that what you are doing should yield expected result, unfortunately I am unable to say what has gone wrong in your case without error message you are getting.
Can you please share messages returned by ansible when trying to use this role?
Sincerely,
Grzegorz Dzień
from ansible-role-nginx.
Hi!
Thank you by helping me.
This tests was done using your galaxy version (ansible-galaxy install nginxinc.nginx
)
an inventory sample:
vars:
nginx_enable: true
nginx_branch: stable
nginx_http_template_enable: true
nginx_http_template:
www1:
template_file: http/default.conf.j2
conf_file_name: www1.example.com.conf
conf_file_location: /etc/nginx/conf.d/
server_name: www1.example.com
port: 80
root: /usr/share/nginx/html/www1
www2:
template_file: http/default.conf.j2
conf_file_name: www2.example.com.conf
conf_file_location: /etc/nginx/conf.d/
server_name: www2.example.com
port: 80
root: /usr/share/nginx/html/www2
- it creates unrequested
default.conf
$ ls -l /etc/nginx/conf.d/
total 12
-rw-r--r--. 1 root root 1093 Dez 4 13:01 default.conf
-rw-r--r--. 1 root root 80 Fev 13 13:46 www1.example.com.conf
-rw-r--r--. 1 root root 80 Fev 13 13:49 www2.example.com.conf
- it doesn't insert a
root
path
$ cat /etc/nginx/conf.d/www2.example.com.conf
# Ansible managed
server {
listen 80;
server_name www2.example.com;
}
from ansible-role-nginx.
Hi!
Well done.
Thank you.
PS: it still creates an unrequested default.conf
from ansible-role-nginx.
Related Issues (20)
- "(Handler) Print NGINX error if syntax check fails" always fails in check mode when nginx hasn't been installed yet HOT 2
- gpg-agent missing
- Support for RHEL 9
- Can't deploy Nginx role on a RHEL machine behind a proxy HOT 4
- Bug nginx_install_from: source (update zlib_version) HOT 1
- Is it possible to install nginx with streams without installing from source? HOT 1
- Unable to install NGINX on SLES (packagekit locks system management) HOT 3
- Mainline to stable apt repository switch is not managed correctly HOT 4
- Allow users to add a dynamic module during a build from source HOT 5
- its not possible to define `nginx_version` with `nginx_install_from: source` to pin the version HOT 2
- idempotency of `nginx_install_from: source`: current validations lack server reboot and ignore installed version HOT 1
- Error when installing the role from Ansible Galaxy: Unable to compare role versions HOT 4
- NGINX Amplify installation changes `agent.conf` even if it's already in the desired state
- Bug with lograte formating HOT 1
- SELinux set to permissive during role run HOT 1
- Incorrect role name in sample playbooks HOT 1
- Validation support for Ubuntu 24.04 (Noble) HOT 2
- Nginx will not install on FreeBSD
- Updated NGINX Signing Keys cause "Add NGINX signing key" task to fail HOT 3
- The specified fingerprint, '573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62', does not match the key fingerprint '8540A6F18833A80E9C1653A42FD21310B49F6B46 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-nginx.