upstream.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ---
  2. - name: Disable 118.190.49.243 Backend 443 & 8080 Port
  3. vars:
  4. java_backend_upstream: |
  5. upstream java_443_backend {
  6. # server 10.30.149.41:50443 weight=30; # 165
  7. # server 10.30.148.149:50443 weight=30; # 243
  8. server 10.31.74.200:50443 weight=30; # 106
  9. }
  10. upstream java_8080_backend {
  11. # server 10.30.149.41:58080 weight=30; # 165
  12. # server 10.30.148.149:58080 weight=30; # 243
  13. server 10.31.74.200:58080 weight=30; # 106
  14. }
  15. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  16. when: close_243_javabackend is defined
  17. tags: java_upstream
  18. - name: Disable 118.190.137.106 Backend 443 & 8080 Port
  19. vars:
  20. java_backend_upstream: |
  21. upstream java_443_backend {
  22. # server 10.30.149.41:50443 weight=30; # 165
  23. server 10.30.148.149:50443 weight=30; # 243
  24. # server 10.31.74.200:50443 weight=30; # 106
  25. }
  26. upstream java_8080_backend {
  27. # server 10.30.149.41:58080 weight=30; # 165
  28. server 10.30.148.149:58080 weight=30; # 243
  29. # server 10.31.74.200:58080 weight=30; # 106
  30. }
  31. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  32. when: close_106_javabackend is defined
  33. tags: java_upstream
  34. - name: Enable 118.190.49.243 Backend 443 & 8080 Port
  35. vars:
  36. java_backend_upstream: |
  37. upstream java_443_backend {
  38. # server 10.30.149.41:50443 weight=30; # 165
  39. server 10.30.148.149:50443 weight=30; # 243
  40. # server 10.31.74.200:50443 weight=30; # 106
  41. }
  42. upstream java_8080_backend {
  43. # server 10.30.149.41:58080 weight=30; # 165
  44. server 10.30.148.149:58080 weight=30; # 243
  45. # server 10.31.74.200:58080 weight=30; # 106
  46. }
  47. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  48. when: open_243_javabackend is defined
  49. tags: java_upstream
  50. - name: Enable 118.190.137.106 Backend 443 & 8080 Port
  51. vars:
  52. java_backend_upstream: |
  53. upstream java_443_backend {
  54. # server 10.30.149.41:50443 weight=30; # 165
  55. # server 10.30.148.149:50443 weight=30; # 243
  56. server 10.31.74.200:50443 weight=30; # 106
  57. }
  58. upstream java_8080_backend {
  59. # server 10.30.149.41:58080 weight=30; # 165
  60. # server 10.30.148.149:58080 weight=30; # 243
  61. server 10.31.74.200:58080 weight=30; # 106
  62. }
  63. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  64. when: open_106_javabackend is defined
  65. tags: java_upstream
  66. - name: Enable 118.190.50.165 Backend 443 & 8080 Port
  67. vars:
  68. java_backend_upstream: |
  69. upstream java_443_backend {
  70. server 10.30.149.41:50443 weight=30; # 165
  71. # server 10.30.148.149:50443 weight=30; # 243
  72. # server 10.31.74.200:50443 weight=30; # 106
  73. }
  74. upstream java_8080_backend {
  75. server 10.30.149.41:58080 weight=30; # 165
  76. # server 10.30.148.149:58080 weight=30; # 243
  77. # server 10.31.74.200:58080 weight=30; # 106
  78. }
  79. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  80. when: open_165_javabackend is defined
  81. tags: java_upstream
  82. - name: Disable 118.190.50.165 Backend 443 & 8080 Port
  83. vars:
  84. java_backend_upstream: |
  85. upstream java_443_backend {
  86. # server 10.30.149.41:50443 weight=30; # 165
  87. server 10.30.148.149:50443 weight=30; # 243
  88. server 10.31.74.200:50443 weight=30; # 106
  89. }
  90. upstream java_8080_backend {
  91. # server 10.30.149.41:58080 weight=30; # 165
  92. server 10.30.148.149:58080 weight=30; # 243
  93. server 10.31.74.200:58080 weight=30; # 106
  94. }
  95. template: src=nginx.conf dest=/usr/local/openresty/nginx/conf/nginx.conf owner=root group=root mode=0644
  96. when: close_165_javabackend is defined
  97. tags: java_upstream
  98. - name: Check Configuration
  99. shell: /usr/local/openresty/nginx/sbin/nginx -t
  100. tags: java_upstream
  101. - name: Reload /usr/local/openresty/nginx/
  102. shell: /usr/local/openresty/nginx/sbin/nginx -s reload
  103. tags: java_upstream