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

Add: proxy_env variable #482

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

AliMehraji
Copy link

Changes:

  • defaults/main.yml:

    • Add proxy_env variable
  • tasks/docker-compose.yml:

    • environment for Install Docker Compose (if configured) task
  • tasks/main.yml:
    Add environment in the below tasks:

    • Install Docker packages
    • Install Docker packages (with downgrade option)
    • Install docker-compose plugin.
    • Install docker-compose-plugin (with downgrade option).
  • tasks/setup-Debian.yml:

    Add environment in the below tasks:

    • Ensure the repo referencing the previous trusted.gpg.d key is not present
    • Ensure dependencies are installed.
    • Add Docker apt key.
    • Ensure curl is present (on older systems without SNI).
    • Add Docker apt key (alternative for older systems without SNI).
    • Add Docker repository.
  • tasks/setup-RedHat.yml:
    Add environment in the below tasks:

    • Add Docker GPG key.
    • Add Docker repository.
    • Configure Docker Nightly repo.
    • Configure Docker Test repo.
    • Block: Configure containerd on RHEL 8.
      • Ensure container-selinux is installed.
      • Ensure containerd.io is installed.

@geerlingguy
Copy link
Owner

This seems like a lot of changes to support something that may be able to be set on a wider level instead of per-task...

@AliMehraji
Copy link
Author

AliMehraji commented Dec 9, 2024

This seems like a lot of changes to support something that may be able to be set on a wider level instead of per-task...

I agree that implementing this at the role level could offer a more streamlined approach. My initial intention was to apply it on a per-task basis to ensure it's only activated when specifically needed, thereby providing more granular control and avoiding unintended side effects across all tasks within the role.

However, I'm open to exploring a role-level configuration or any recommendation you might have. I’d appreciate your guidance on the best approach to align with our overall strategy and maintainability goals.

For instance:

The proxy environment is not needed in the Ensure old versions of Docker are not installed. task within tasks/setup-RedHat.yml, which is why I implemented it on a per-task basis.

@AliMehraji
Copy link
Author

AliMehraji commented Dec 17, 2024

Additionally, I plan to update module references to use fully qualified collection names (e.g., ansible.builtin.<module>).
Also, plan to resolve ansible lint warnings

Do you have any recommendations or preferences for these changes?

Example:

  • In handlers/main.yml, the service module would be updated to ansible.builtin.service
  • In tasks/docker-users.yml, the user module would be updated to ansible.builtin.user

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.

2 participants