Skip to content

Commit

Permalink
Remove deprecated parameters (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
alessfg committed Dec 11, 2021
1 parent c777595 commit bc47f38
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 77 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.5.0 (Unreleased)

BREAKING CHANGES:

Remove parameters deprecated in release `0.4.0`. To recap, these are `nginx_config_main_upload_*`, `nginx_config_upload_html_*`, and `nginx_config_stream_upload_*`. Use `nginx_config_upload` instead.

## 0.4.2 (October 28, 2021)

BUG FIXES:
Expand All @@ -25,7 +31,7 @@ Efforts have been made to thoroughly test all these changes and make sure they w

DEPRECATION WARNINGS:

The `nginx_config_main_upload_*`, `nginx_config_upload_html_*`, and `nginx_config_stream_upload_*` parameters have been deprecated in favor of a newly introduced parameter, `nginx_config_upload_*` (previously `nginx_config_snippet_upload_*`). The new parameter provides greater flexibility in configuring your upload settings in addition to simplifying the upload Ansible tasks. The deprecated parameters will be removed in the next major release (0.5.0), due December 2021.
The `nginx_config_main_upload_*`, `nginx_config_upload_html_*`, and `nginx_config_stream_upload_*` parameters have been deprecated in favor of a newly introduced parameter, `nginx_config_upload` (previously `nginx_config_snippet_upload_*`). The new parameter provides greater flexibility in configuring your upload settings in addition to simplifying the upload Ansible tasks. The deprecated parameters will be removed in the next major release (0.5.0), due December 2021.

BREAKING CHANGES:

Expand Down
12 changes: 0 additions & 12 deletions defaults/main/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
# Enable uploading NGINX related files to your system.
# Default for uploading files is false.
# Default location of files is the files folder within the NGINX Config Ansible role.
# (DEPRECATED) Upload the main NGINX configuration file.
nginx_config_main_upload_enable: false
nginx_config_main_upload_src: config/nginx.conf
nginx_config_main_upload_dest: /etc/nginx/
# (DEPRECATED) Upload HTTP NGINX configuration files.
nginx_config_http_upload_enable: false
nginx_config_http_upload_src: config/http/*.conf
nginx_config_http_upload_dest: /etc/nginx/conf.d/
# (DEPRECATED) Upload Stream NGINX configuration files.
nginx_config_stream_upload_enable: false
nginx_config_stream_upload_src: config/stream/*.conf
nginx_config_stream_upload_dest: /etc/nginx/conf.d/
# Upload NGINX config files/snippets.
nginx_config_upload_enable: false
nginx_config_upload:
Expand Down
7 changes: 0 additions & 7 deletions molecule/stable_push/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@
nginx_config_upload_ssl_key:
- src: ../common/files/ssl/molecule.key
dest: /etc/ssl/private

# DEPRECATED
nginx_config_main_upload_enable: true
nginx_config_main_upload_src: ../common/files/nginx.conf
nginx_config_http_upload_enable: true
nginx_config_http_upload_src: ../common/files/http/*.conf
nginx_config_http_upload_dest: /etc/nginx/conf.d/deprecated_http
53 changes: 0 additions & 53 deletions tasks/config/upload-config.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,4 @@
---
- name: (DEPRECATED) Upload NGINX main config
block:
- name: (DEPRECATED) Ensure NGINX main directory exists
file:
path: "{{ nginx_config_main_upload_dest | default('/etc/nginx/') }}"
state: directory
mode: 0755

- name: (DEPRECATED) Upload NGINX main config file
copy:
src: "{{ nginx_config_main_upload_src | default('conf/nginx.conf') }}"
dest: "{{ nginx_config_main_upload_dest | default('/etc/nginx') }}"
backup: true
mode: 0644
notify: (Handler - NGINX Config) Run NGINX
when: nginx_config_main_upload_enable | bool

- name: (DEPRECATED) Upload NGINX HTTP config
block:
- name: (DEPRECATED) Ensure NGINX HTTP directory exists
file:
path: "{{ nginx_config_http_upload_dest | default('/etc/nginx/conf.d/') }}"
state: directory
mode: 0755

- name: (DEPRECATED) Upload NGINX HTTP config files
copy:
src: "{{ item }}"
dest: "{{ nginx_config_http_upload_dest | default('/etc/nginx/conf.d/') }}"
backup: true
mode: 0644
with_fileglob: "{{ nginx_config_http_upload_src }}"
notify: (Handler - NGINX Config) Run NGINX
when: nginx_config_http_upload_enable | bool

- name: (DEPRECATED) Upload NGINX stream config
block:
- name: (DEPRECATED) Ensure NGINX stream directory exists
file:
path: "{{ nginx_config_stream_upload_dest | default('/etc/nginx/conf.d/') }}"
state: directory
mode: 0755

- name: (DEPRECATED) Upload NGINX stream config files
copy:
src: "{{ item }}"
dest: "{{ nginx_config_stream_upload_dest | default('/etc/nginx/conf.d/') }}"
backup: true
mode: 0644
with_fileglob: "{{ nginx_config_stream_upload_src }}"
notify: (Handler - NGINX Config) Run NGINX
when: nginx_config_stream_upload_enable | bool

- name: Upload NGINX config snippets
block:
- name: Ensure NGINX config snippet directories exist
Expand Down
5 changes: 1 addition & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

- name: Upload NGINX config
include_tasks: "{{ role_path }}/tasks/config/upload-config.yml"
when: nginx_config_main_upload_enable | bool
or nginx_config_http_upload_enable | bool
or nginx_config_stream_upload_enable | bool
or nginx_config_upload_enable | bool
when: nginx_config_upload_enable | bool
or nginx_config_upload_html_enable | bool
or nginx_config_upload_ssl_enable | bool
tags: nginx_config_upload
Expand Down

0 comments on commit bc47f38

Please sign in to comment.