sparkfabrik / sparkdock

Automatic MacOS system provisioning
Other
20 stars 8 forks source link

feat: remove ubuntu as now it is managed by a custom provisioner #87

Closed paolomainardi closed 2 months ago

paolomainardi commented 2 months ago

PR Type

Enhancement, Documentation


Description


Changes walkthrough ๐Ÿ“

Relevant files
Documentation
2 files
LICENSE
Add GNU General Public License v3                                               

LICENSE - Added the full text of the GNU General Public License version 3
+390/-0 
README.md
Simplify README and update project information                     

README.md
  • Removed detailed package lists for MacOS
  • Simplified installation instructions
  • Updated maintainer information
  • +4/-58   
    Enhancement
    7 files
    macos.yml
    Update macOS playbook structure                                                   

    ansible/macos.yml - Removed playbook for macOS 11 - Simplified playbook structure
    +13/-18 
    macos11.yml
    Remove macOS 11 specific playbook                                               

    ansible/macos/macos11.yml - Removed entire file containing macOS 11 specific configurations
    +0/-68   
    ubuntu.yml
    Remove Ubuntu playbook                                                                     

    ansible/ubuntu.yml - Removed entire file containing Ubuntu configurations
    +0/-9     
    ubuntu20.yml
    Remove Ubuntu 20+ specific playbook                                           

    ansible/ubuntu/ubuntu20.yml - Removed entire file containing Ubuntu 20+ specific configurations
    +0/-130 
    install.ubuntu
    Remove Ubuntu installation script                                               

    bin/install.ubuntu - Removed entire file containing Ubuntu installation script
    +0/-41   
    run-dinghy-proxy
    Remove Ubuntu dinghy-proxy run script                                       

    config/ubuntu/bin/run-dinghy-proxy - Removed entire file containing dinghy-proxy run script for Ubuntu
    +0/-30   
    run-dnsdock
    Remove Ubuntu dnsdock run script                                                 

    config/ubuntu/bin/run-dnsdock - Removed entire file containing dnsdock run script for Ubuntu
    +0/-15   
    Formatting
    1 files
    base.yml
    Minor formatting update in macOS base playbook                     

    ansible/macos/macos/base.yml - Minor formatting change (removed whitespace)
    +1/-1     

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    sparkfabrik-ai-bot[bot] commented 2 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 2 ๐Ÿ”ต๐Ÿ”ตโšชโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    Code Smell
    The `when` conditions for importing playbooks are repeated multiple times. Consider refactoring to avoid redundancy.
    sparkfabrik-ai-bot[bot] commented 2 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Maintainability
    Consolidate multiple import_playbook tasks into a single task with a more inclusive conditional statement ___ **Consider using a single task with a conditional statement instead of multiple
    import_playbook tasks for different macOS versions. This would make the playbook
    more concise and easier to maintain.** [ansible/macos.yml [7-17]](https://github.com/sparkfabrik/sparkdock/pull/87/files#diff-74eaffaddb7e6ee392f81e5060f6bea50b791cdb80f2292b2257c744fb4e0e38R7-R17) ```diff -- name: Importing playbook for macOS 14 +- name: Import playbook for macOS import_playbook: macos/macos/base.yml - when: ansible_distribution_version | regex_search('^(14.[0-9]+)') + when: ansible_distribution_version | regex_search('^(1[2-4].[0-9]+)') -- name: Importing playbook for macOS 13 - import_playbook: macos/macos/base.yml - when: ansible_distribution_version | regex_search('^(13.[0-9]+)') - -- name: Importing playbook for macOS 12 - import_playbook: macos/macos/base.yml - when: ansible_distribution_version | regex_search('^(12.[0-9]+)') - ```
    Suggestion importance[1-10]: 8 Why: This suggestion significantly improves code maintainability by reducing redundancy and making it easier to add support for future macOS versions.
    8
    Enhancement
    Use a loop for installing and linking multiple PHP versions to improve flexibility and maintainability ___ **Consider using a loop to install multiple PHP versions instead of hardcoding a
    single version. This would make it easier to manage and update PHP versions in the
    future.** [ansible/macos/macos/base.yml [100-103]](https://github.com/sparkfabrik/sparkdock/pull/87/files#diff-35e06808caf91480daa0d30bc6b6a1e4c425376bb5d3196d021dca2357bdd621R100-R103) ```diff -- name: Link php 8.2 +- name: Link PHP versions community.general.homebrew: - name: php@8.2 + name: "php@{{ item }}" state: linked + loop: + - "8.2" + - "8.1" + - "8.0" ```
    Suggestion importance[1-10]: 7 Why: This suggestion improves code maintainability and flexibility by allowing easy addition or removal of PHP versions without modifying the playbook structure.
    7