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 Cockpit role #185

Closed
wants to merge 10 commits into from
Closed

Add Cockpit role #185

wants to merge 10 commits into from

Conversation

RaneyDazed
Copy link

This pull request includes several updates to the Cockpit role, including the addition of essential configs, web, DNS, and Traefik configurations, and improvements to the service and config setup. It also enhances the DNS setup, disables the Cockpit Traefik API by default, and enforces HTTPS in Cockpit origins. GH copilot thought that would be sufficient detail. :p

Added new role for Cockpit management into the project, including default variables, main installation and service enablement tasks, and template files for configuration and Traefik setup. The defaults specify paths for various configuration files and the main tasks cover installation from backports and service activation. Templates configure Cockpit’s behavior behind a reverse proxy and define routing and load-balancing settings for Traefik, facilitating secure access and streamlining Cockpit integration into the existing infrastructure.
Extended the 'cockpit' role defaults and template to include web domain configuration, DNS settings, and Traefik HTTP routing. Users can now specify custom subdomains, leverage auto SSL with Traefik, and benefit from enhanced routing options.
Introduced a new variable to define the HTTP URL for cockpit and updated the corresponding traffic rule to match on the new HTTP URL. This change ensures correct routing for non-HTTPS traffic.
Streamlined Cockpit deployment by implementing conditional logic to check and stop an existing socket before installation and configuring socket templates for improved flexibility. Web service origin is now dynamic, and redundant references in defaults have been cleaned up. Also commented out an incomplete Traefik template for clarity.
Refactored the Cockpit Ansible role for clearer structure and improved maintainability. Added tasks for directory creation and configuration file setup using templates for the socket, main config, and Traefik service. Also included a step to adjust file ownership contingent upon the environment, excluding continuous integration. The redundant 'cockpit_socket' import task was removed as part of streamlining the role.
Included task to ensure the Cockpit service starts during provisioning, enhancing system management capabilities.
Refactored the Ansible playbook for the Cockpit role to ensure the cockpit service is checked and correctly started if already present. Cleaned up default variable declarations and updated the Traefik configuration template to dynamically use predefined variable values, enhancing flexibility and readability. Removed unnecessary comments and deprecated folder paths to streamline configuration.
Removed hardcoded 'https://' prefix from web URL configuration to support flexible schemes. Added a new task for creating DNS records, ensuring dynamic DNS configuration during deployment.
Updated the Cockpit role to deactivate the Traefik API by default, enhancing security by limiting unnecessary exposure.
Updated the WebService origins configuration to enforce HTTPS, improving the security of Cockpit deployments.
@RaneyDazed
Copy link
Author

ah shoot sorry can someone move this to sandbox? or want me to close and open @ sandbox?

@owine
Copy link
Collaborator

owine commented Feb 11, 2024

Can't move a PR like that, you'll need to open a new one over there

@owine owine closed this Feb 11, 2024
@RaneyDazed
Copy link
Author

alrighty thanks owine

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