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

Resolve linter issues (ansible-lint, yamllint, flake8) #315

Merged
merged 54 commits into from
May 24, 2023
Merged

Resolve linter issues (ansible-lint, yamllint, flake8) #315

merged 54 commits into from
May 24, 2023

Commits on May 3, 2023

  1. 🐳 chore(Dockerfile): add Docker installation and create gitpod user

    The Dockerfile installs Docker and other packages required for development. It also creates a gitpod user with UID 33333.
    🔧 chore(gitpod.yml): update Dockerfile path to match new location
    The .gitpod.yml file is updated to reflect the new location of the Dockerfile.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    bf055e8 View commit details
    Browse the repository at this point in the history
  2. 🔧 chore(playbooks): improve readability of playbooks by removing unne…

    …cessary hyphens and quotes
    
    The changes in these playbooks are purely cosmetic, removing unnecessary hyphens and quotes to improve readability and consistency. This makes the playbooks easier to read and understand, which can help with maintenance and future development.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    715fa35 View commit details
    Browse the repository at this point in the history
  3. 🔧 chore(playbook): add noqa run-once to run_once tasks to suppress …

    …Ansible linting warnings
    
    The `run_once` tasks in the playbook were updated to include a `noqa run-once` comment to suppress Ansible linting warnings. This improves the readability of the playbook and reduces the noise generated by the linter.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    c13447a View commit details
    Browse the repository at this point in the history
  4. 🚀 chore(add_balancer.yml): add descriptive name to playbook and host

    The playbook now has a descriptive name "Add load balancer" to improve readability and understanding of the playbook's purpose. The host section now has a name "new_balancer" to improve the clarity of the playbook's target.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    1806dba View commit details
    Browse the repository at this point in the history
  5. 📝 chore(add_balancer.yml): update task names to improve readability a…

    …nd traceability
    
    The first task name has been updated to include the name of the playbook file to improve traceability. The second task name has been updated to include more descriptive language to improve readability.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    7644c6b View commit details
    Browse the repository at this point in the history
  6. 🐛 fix(add_pgnode.yml): change include to include_tasks to avoid depre…

    …cation warning
    
    The include keyword is deprecated and will be removed in future versions of Ansible. The include_tasks keyword should be used instead to include tasks from another file.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    890bb04 View commit details
    Browse the repository at this point in the history
  7. 🚀 chore(add_pgnode.yml): improve readability and add descriptive name…

    …s to tasks
    
    The changes in this commit improve the readability of the playbook by adding descriptive names to the tasks. The name of the task now reflects the purpose of the task, making it easier to understand what is happening in the playbook. Additionally, the changes make the playbook more modular by importing the Consul playbook instead of duplicating the code.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    05ee14b View commit details
    Browse the repository at this point in the history
  8. 📝 chore(add_pgnode.yml): add task names to improve readability and tr…

    …aceability
    
    The commit adds task names to the playbook to improve readability and traceability of the tasks. The task names are now prefixed with the name of the playbook, which makes it easier to identify which playbook a task belongs to.
    ThomasSanson committed May 3, 2023
    Configuration menu
    Copy the full SHA
    c6e4cc6 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. 🔥 chore(balancers.yml): remove unnecessary line

    The line "---" was removed from the beginning of the file as it was unnecessary.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    d6998a1 View commit details
    Browse the repository at this point in the history
  2. 🎨 style(balancers.yml): add name to playbook and update hosts key to …

    …improve readability
    
    The name key was added to the playbook to provide a clear and concise description of what the playbook does. The hosts key was updated to use a more descriptive name to improve readability and make it easier to understand what the playbook is targeting.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    eb3b9a2 View commit details
    Browse the repository at this point in the history
  3. 📝 docs(balancers.yml): update playbook name in balancers.yml to impro…

    …ve readability
    
    The playbook name in balancers.yml has been updated to include the filename for better readability.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    ebb6824 View commit details
    Browse the repository at this point in the history
  4. 🔥 chore(config_pgcluster.yml): remove unnecessary lines

    The changes in this commit remove unnecessary whitespace and a line that was not needed in the configuration file. This improves the readability and maintainability of the code.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    b1aaad2 View commit details
    Browse the repository at this point in the history
  5. 📝 docs(config_pgcluster.yml): add file name to playbook name and impr…

    …ove task names
    
    The playbook name now includes the file name to improve clarity and the task names have been improved to better describe what they do.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    df96a2d View commit details
    Browse the repository at this point in the history
  6. 📝 docs(balancers.yml): fix typo in playbook name

    The playbook name was misspelled as "balancer.yml" instead of "balancers.yml". This commit fixes the typo to improve the readability and clarity of the playbook name.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    9583b63 View commit details
    Browse the repository at this point in the history
  7. 🔧 chore(config_pgcluster.yml): improve playbook readability by adding…

    … descriptive names to tasks
    
    The playbook has been updated to include descriptive names for each task. This improves the readability of the playbook and makes it easier to understand what each task is doing. The names have been added to the tasks that configure the Postgres cluster, deploy the Postgres cluster, and configure HAProxy load balancing.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    541b58a View commit details
    Browse the repository at this point in the history
  8. 🐛 fix(config_pgcluster.yml): change include to include_tasks in handlers

    The include keyword is deprecated and should be replaced with include_tasks. This commit updates the handlers in the config_pgcluster.yml file to use include_tasks instead of include.
    ThomasSanson committed May 5, 2023
    Configuration menu
    Copy the full SHA
    d74843e View commit details
    Browse the repository at this point in the history

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    d0d7a36 View commit details
    Browse the repository at this point in the history
  2. 🔍 chore(consul.yml): remove unnecessary whitespace and comments

    The changes in this commit are purely cosmetic. The commit removes unnecessary whitespace and comments in the consul.yml file to improve readability and maintainability.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a790732 View commit details
    Browse the repository at this point in the history
  3. 🎨 style(consul.yml): add name to playbook and update host names for r…

    …eadability
    
    The name "Consul Playbook" was added to the playbook to improve readability and make it easier to identify the purpose of the playbook. The host names were also updated to be more descriptive and improve readability.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    fdd2be5 View commit details
    Browse the repository at this point in the history
  4. 📝 chore(consul.yml): update playbook name and task names for better r…

    …eadability
    
    The playbook name and task names have been updated to include the filename and to be more descriptive. This improves the readability of the playbook and makes it easier to understand what each task is doing.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    dc4ce0c View commit details
    Browse the repository at this point in the history
  5. 🔥 chore(deploy_pgcluster.yml): remove unnecessary lines

    The changes in this commit remove unnecessary lines in the deploy_pgcluster.yml file. Specifically, the removed lines are the name of the playbook and the ellipsis at the end of the file.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    33fa52e View commit details
    Browse the repository at this point in the history
  6. 🚀 chore(deploy_pgcluster.yml): add names to import_playbook tasks for…

    … better readability
    
    The import_playbook tasks in the deploy_pgcluster.yml file have been given names to improve the readability of the playbook. The names now reflect the purpose of the tasks, making it easier to understand what each task does.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    171b17a View commit details
    Browse the repository at this point in the history
  7. 📝 chore(deploy_pgcluster.yml): add task names to playbook for better …

    …readability
    
    The playbook now has task names for each section to improve readability and make it easier to understand what each section does. The task names are "Postgres Cluster Configuration", "Install and configure pgBackRest", and "PostgreSQL Cluster Deployment".
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a8cb1ed View commit details
    Browse the repository at this point in the history
  8. 🚀 chore(deploy_pgcluster.yml): add playbook name to all tasks for bet…

    …ter readability
    
    The playbook name was added to all tasks in the deploy_pgcluster.yml file to improve readability and make it easier to identify which playbook a task belongs to.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    74aea7b View commit details
    Browse the repository at this point in the history
  9. 🐛 fix(ansible): set default value for firewall_ports_dynamic_var to a…

    …n empty list
    
    The firewall_ports_dynamic_var variable is now set to a default value of an empty list to avoid errors when the variable is not defined. This change was made in multiple ansible files.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    195f10a View commit details
    Browse the repository at this point in the history
  10. 🐛 fix(firewall): set default value for firewall_additional_rules to a…

    …n empty list
    
    ✨ feat(firewall): ensure firewall_additional_rules is unique
    The firewall_additional_rules variable is now set to a default value of an empty list to avoid errors when the variable is not defined. The unique filter is also applied to the variable to ensure that there are no duplicate rules.
    ThomasSanson committed May 6, 2023
    Configuration menu
    Copy the full SHA
    a56b54c View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. 📝 chore(etcd_cluster.yml): update playbook name and add description

    The playbook name has been updated to better reflect its purpose. The name change also improves readability and makes it easier to understand what the playbook does. A description has been added to provide more context and clarity.
    ThomasSanson committed May 7, 2023
    Configuration menu
    Copy the full SHA
    9377db7 View commit details
    Browse the repository at this point in the history
  2. 🐛 fix(main.yml): wrap min_ansible_version and platform versions in qu…

    …otes
    
    The min_ansible_version and platform versions are now wrapped in quotes to ensure that they are interpreted as strings. This is important because some versions may contain characters that could be interpreted as numbers or other data types. Wrapping them in quotes ensures that they are interpreted as strings and avoids any potential issues.
    ThomasSanson committed May 7, 2023
    Configuration menu
    Copy the full SHA
    887d239 View commit details
    Browse the repository at this point in the history
  3. 🔥 chore(main.yml): remove high-availability tag from galaxy_tags

    The high-availability tag is being removed from the galaxy_tags list as it is not relevant to this role.
    ThomasSanson committed May 7, 2023
    Configuration menu
    Copy the full SHA
    347a4cb View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. 🔨 refactor(converge.yml): remove unnecessary comments and whitespace

    The commit removes unnecessary comments and whitespace in the converge.yml file. This improves the readability of the file and makes it easier to maintain.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    fdea635 View commit details
    Browse the repository at this point in the history
  2. 🚀 chore(converge.yml): add name to import_playbook task and remove un…

    …necessary hyphen
    
    The name attribute was added to the import_playbook task to improve readability and make it easier to identify the task in the output. The hyphen before the import_playbook task was removed as it was unnecessary.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    cbdc11e View commit details
    Browse the repository at this point in the history
  3. 🔥 chore(remove_cluster.yml): remove unnecessary lines and trailing wh…

    …itespace
    
    The changes in this commit are purely cosmetic. Removed unnecessary comments and trailing whitespace to improve readability and consistency.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    648df92 View commit details
    Browse the repository at this point in the history
  4. 🎨 style(remove_cluster.yml): add descriptive names to playbook and plays

    The playbook and plays in the remove_cluster.yml file have been updated to include descriptive names. The PostgreSQL and Etcd plays have been named to improve readability and make it easier to understand what each play does.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b725925 View commit details
    Browse the repository at this point in the history
  5. 🔥 chore(remove_cluster.yml): update playbook names and add comments

    The playbook names have been updated to include the filename for better identification. Comments have been added to explain the purpose of the variables.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    e78f252 View commit details
    Browse the repository at this point in the history
  6. 🚀 chore(converge.yml): add descriptive name to import_playbook task

    The task to import the deploy_pgcluster.yml playbook has been given a more descriptive name to improve readability and clarity of the task's purpose.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    4e4501b View commit details
    Browse the repository at this point in the history
  7. 🔍 chore(yedit.py): fix typos and formatting in options description

    The commit fixes a typo in the options description of the yedit.py file. The word "follow" was missing a space after it. The commit also removes an unnecessary newline character.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    30a971e View commit details
    Browse the repository at this point in the history
  8. 🔧 chore(.flake8): ignore E501 error code to allow lines to exceed 79 …

    …characters
    
    The E501 error code is ignored to allow lines to exceed the default 79 character limit. This is done to improve readability and reduce the need for unnecessary line breaks.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    6fddafa View commit details
    Browse the repository at this point in the history
  9. 🔧 chore(.flake8): add W503 to ignored errors

    🐛 fix(yedit.py): fix typo in error message and split it into two lines for readability
    🔥 refactor(yedit.py): remove unused json_roundtrip_clean function
    The ignored errors in flake8 have been updated to include W503. In yedit.py, a typo in the error message has been fixed and the message has been split into two lines for better readability. The unused json_roundtrip_clean function has been removed.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    ae2e372 View commit details
    Browse the repository at this point in the history
  10. 🔨 refactor(yedit.py): improve readability by removing unnecessary str…

    …ing concatenation
    
    The commit removes unnecessary string concatenation in two raise statements in the Yedit class. The code is now more readable and easier to understand.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    1c66975 View commit details
    Browse the repository at this point in the history
  11. 🐛 fix(yedit.py): fix formatting of exception message

    The exception message was split into two lines, which made it harder to read. This commit fixes the formatting of the message to make it more readable.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    b478278 View commit details
    Browse the repository at this point in the history
  12. 🐛 fix(yedit.py): fix formatting of exception message

    The exception message was formatted in a way that made it difficult to read. This commit fixes the formatting of the exception message to make it more readable.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    c15c7f8 View commit details
    Browse the repository at this point in the history
  13. 🐛 fix(yedit.py): remove unnecessary line break in YeditException message

    The line break in the YeditException message was unnecessary and made the message harder to read. This commit removes the line break to improve readability.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    30b3236 View commit details
    Browse the repository at this point in the history
  14. 🐛 fix(yedit.py): remove unnecessary line break in if statement

    The line break in the if statement was unnecessary and made the code harder to read. This commit removes the line break to improve readability.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    41730f7 View commit details
    Browse the repository at this point in the history
  15. 🐛 fix(yedit.py): remove unnecessary parentheses and improve code read…

    …ability
    
    The parentheses around the condition in the elif statement are unnecessary and have been removed to improve code readability.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    8977fb6 View commit details
    Browse the repository at this point in the history
  16. 🐛 fix(yedit.py): fix whitespace around subtraction operator in if sta…

    …tement
    
    The if statement was checking if an index was greater than the length of a list minus one. The subtraction operator was not surrounded by whitespace, which is not consistent with PEP8 style guide. This commit fixes the whitespace around the subtraction operator to improve code readability and consistency with PEP8.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    f4a05db View commit details
    Browse the repository at this point in the history
  17. 🐛 fix(yedit.py): remove unnecessary line breaks in if statements

    The changes remove unnecessary line breaks in if statements to improve code readability.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    7ee6a2f View commit details
    Browse the repository at this point in the history
  18. 🐛 fix(.flake8): add E402 to ignored errors to avoid false positives

    The E402 error is now ignored in the flake8 configuration file. This change was made to avoid false positives in the codebase.
    ThomasSanson committed May 8, 2023
    Configuration menu
    Copy the full SHA
    387e9c8 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. 🐛 fix(config_pgcluster.yml): add check for PostgreSQL version when en…

    …abling TimescaleDB
    
    ✨ feat(config_pgcluster.yml): add support for TimescaleDB by adding 'timescaledb' to 'shared_preload_libraries' PostgreSQL parameter
    The check for the PostgreSQL version is added to ensure that the current version is supported by TimescaleDB. If the version is not supported, the playbook will fail. The support for TimescaleDB is added by adding 'timescaledb' to the 'shared_preload_libraries' PostgreSQL parameter. This is done by modifying the 'postgresql_parameters' variable. If 'timescaledb' is not already present in the value of 'shared_preload_libraries', it is appended to the end of the value. If it is already present, the value is left unchanged.
    ThomasSanson committed May 23, 2023
    Configuration menu
    Copy the full SHA
    f75ba88 View commit details
    Browse the repository at this point in the history
  2. 🔍 chore(.gitignore): add .vscode/settings.json to ignore list

    The .vscode/settings.json file is now being ignored by git. This file is used to store user settings for the Visual Studio Code editor.
    ThomasSanson committed May 23, 2023
    Configuration menu
    Copy the full SHA
    27963e7 View commit details
    Browse the repository at this point in the history
  3. 🐛 fix(deploy_pgcluster.yml): add check for PostgreSQL version when en…

    …abling TimescaleDB
    
    ✨ feat(deploy_pgcluster.yml): add support for TimescaleDB installation via repository
    The playbook now checks the PostgreSQL version before enabling TimescaleDB to ensure that it is compatible. If the version is not compatible, the playbook will fail. Additionally, support for TimescaleDB installation via repository has been added. The playbook now ensures that 'timescaledb' is in 'shared_preload_libraries' when TimescaleDB is enabled.
    ThomasSanson committed May 23, 2023
    Configuration menu
    Copy the full SHA
    8d99dcd View commit details
    Browse the repository at this point in the history
  4. 🚀 feat(converge.yml): add enable_timescale variable for TimescaleDB c…

    …luster deployment test
    
    The enable_timescale variable is set to true to enable testing of TimescaleDB cluster deployment. The variable is only set if the ansible_distribution is not Ubuntu 20.04, as there is a known issue with TimescaleDB on that version.
    ThomasSanson committed May 23, 2023
    Configuration menu
    Copy the full SHA
    4af8781 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8170576 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Update config_pgcluster.yml

    Co-authored-by: Vitaliy Kukharik <37010174+vitabaks@users.noreply.github.com>
    ThomasSanson and vitabaks committed May 24, 2023
    Configuration menu
    Copy the full SHA
    5d04d2d View commit details
    Browse the repository at this point in the history
  2. Update deploy_pgcluster.yml

    Co-authored-by: Vitaliy Kukharik <37010174+vitabaks@users.noreply.github.com>
    ThomasSanson and vitabaks committed May 24, 2023
    Configuration menu
    Copy the full SHA
    9e254cb View commit details
    Browse the repository at this point in the history