Skip to content
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

Removed unused variables, as they add to confusion #428

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

gclough
Copy link
Collaborator

@gclough gclough commented Apr 15, 2019

Removed unused default variables (as in not used ANYWHERE). Checked with:

#!/bin/bash -

cat defaults/main.yml | grep ^[a-z] | cut -f1 -d: | while read VAR; do
  echo $VAR
  COUNT=`grep -r $VAR * | wc -l`
  echo $COUNT
  if [ $COUNT -le 1 ]; then
    echo ERROR;
  fi;
  echo =====================================================
done | less

I've also moved some of them to a more logical location.

@@ -2,6 +2,8 @@

# Basic settings
postgresql_version: 11
# Short version of the postgresql_version, used in some path and filenames
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved postgresql_version_terse next to the postgresql_version, rather than in a random place down the file.

@@ -15,6 +17,10 @@ postgresql_ctype_parts:
- "UTF-8" # Encoding
postgresql_ctype: "{{ postgresql_ctype_parts | join('.') }}"

postgresql_env:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved postgresql_env close to the other environment variables, rather than in some random place further down in the file.

@@ -117,10 +123,6 @@ postgresql_unix_socket_directories: # (>= 9.3)
postgresql_unix_socket_group: ""
postgresql_unix_socket_permissions: "0777" # begin with 0 to use octal notation

# Automatic pg_ctl configuration. Specify a list of options containing
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely unused, so removed.

@@ -759,10 +761,9 @@ postgresql_pgtune_type: "Mixed"
# Maximum number of expected connections, if "no", default based on db type
postgresql_pgtune_connections: no


postgresql_env:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved up to a better spot.

postgresql_env:
LC_ALL: "{{ postgresql_locale }}"
LC_LCTYPE: "{{ postgresql_locale }}"
#------------------------------------------------------------------------------
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New block header

@@ -774,67 +775,6 @@ postgresql_apt_repository: "deb http://apt.postgresql.org/pub/repos/apt/ {{ ansi
# Pin-Priority of PGDG repository
postgresql_apt_pin_priority: 500

# Yum settings
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely unused... so we've been maintaining this for nothing.

11: 2,
}

postgresql_version_terse: "{{ postgresql_version | replace('.', '') }}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved up to a more logical location

@gclough gclough merged commit d7df079 into ANXS:master Apr 15, 2019
@gclough gclough deleted the cleanup_old_yum_variables branch April 15, 2019 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant