ansible-role-nginx-config icon indicating copy to clipboard operation
ansible-role-nginx-config copied to clipboard

Explicitly specify http_version as string

Open orlovmyk opened this issue 1 year ago • 4 comments

Explicitly specify http_version as string, because otherwise it's a number and ignored

Proposed changes

Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the supported keywords here in this description (not in the title of the PR).

Checklist

Before creating a PR, run through this checklist and mark each as complete:

  • [x] I have read the CONTRIBUTING document.
  • [x] I have added Molecule tests that prove my fix is effective or that my feature works.
  • [x] I have checked that any relevant Molecule tests pass after adding my changes.
  • [x] I have updated any relevant documentation (defaults/main/*.yml, README.md and CHANGELOG.md).

orlovmyk avatar Feb 28 '24 19:02 orlovmyk

@alessfg Made requested changes, thx for review

orlovmyk avatar Mar 01 '24 19:03 orlovmyk

@alessfg don't know why it's failing, errors doesn't have anything with my changes Can you please check?

   RUNNING HANDLER [nginxinc.nginx_config : (Handler - NGINX Config) Print NGINX error if syntax check fails] ***
  fatal: [alpine-3.17]: FAILED! => {
      "config_check['stderr_lines']": [
          "nginx: [warn] duplicate MIME type \"text/html\" in /etc/nginx/conf.d/default.conf:246",
          "nginx: [emerg] \"listen\" directive \"so_keepalive\" parameter is incompatible with \"quic\" in /etc/nginx/conf.d/default.conf:300",
          "nginx: configuration file /etc/nginx/nginx.conf test failed"
      ],
      "failed_when_result": true
  }
  fatal: [debian-bullseye]: FAILED! => {
      "config_check['stderr_lines']": [
          "nginx: [warn] duplicate MIME type \"text/html\" in /etc/nginx/conf.d/default.conf:246",
          "nginx: [emerg] \"listen\" directive \"so_keepalive\" parameter is incompatible with \"quic\" in /etc/nginx/conf.d/default.conf:300",
          "nginx: configuration file /etc/nginx/nginx.conf test failed"
      ],
      "failed_when_result": true
  }
  fatal: [rhel-9]: FAILED! => {
      "config_check['stderr_lines']": [
          "nginx: [warn] duplicate MIME type \"text/html\" in /etc/nginx/conf.d/default.conf:246",
          "nginx: [emerg] \"listen\" directive \"so_keepalive\" parameter is incompatible with \"quic\" in /etc/nginx/conf.d/default.conf:300",
          "nginx: configuration file /etc/nginx/nginx.conf test failed"
      ],
      "failed_when_result": true
  }
  fatal: [ubuntu-jammy]: FAILED! => {
      "config_check['stderr_lines']": [
          "nginx: [warn] duplicate MIME type \"text/html\" in /etc/nginx/conf.d/default.conf:246",
          "nginx: [emerg] \"listen\" directive \"so_keepalive\" parameter is incompatible with \"quic\" in /etc/nginx/conf.d/default.conf:300",
          "nginx: configuration file /etc/nginx/nginx.conf test failed"
      ],
      "failed_when_result": true
  }

orlovmyk avatar Mar 02 '24 14:03 orlovmyk

The tests are failing due to a change in the latest nginx release. I'll hopefully have a fix for it sometime next week and then we can test this PR :)

alessfg avatar Mar 03 '24 16:03 alessfg

Quick update -- tests are passing but I want to test a different approach to validating float numbers locally before merging the PR :)

alessfg avatar Mar 05 '24 15:03 alessfg