Optimized pkgmgr variables and removed 'Ensure main.py is executable' because it should be preset by repositories itself

This commit is contained in:
2025-08-29 10:53:36 +02:00
parent 983287a84a
commit 3a79d9d630
3 changed files with 18 additions and 24 deletions

View File

@@ -16,29 +16,23 @@
- name: Create installation directory for Kevin's Package Manager
file:
path: "{{ pkgmgr_install_path }}"
path: "{{ PKGMGR_INSTALL_PATH }}"
state: directory
mode: '0755'
become: true
- name: Clone Kevin's Package Manager repository
git:
repo: "{{ pkgmgr_repo_url }}"
dest: "{{ pkgmgr_install_path }}"
repo: "{{ PKGMGR_REPO_URL }}"
dest: "{{ PKGMGR_INSTALL_PATH }}"
version: "HEAD"
force: yes
become: true
- name: Ensure main.py is executable
file:
path: "{{ pkgmgr_install_path }}/main.py"
mode: '0755'
become: true
- name: create config.yaml
template:
src: config.yaml.j2
dest: "{{ pkgmgr_config_path }}"
dest: "{{ PKGMGR_CONFIG_PATH }}"
become: true
- name: Run the Package Manager install command to create an alias for Kevins package manager
@@ -46,6 +40,6 @@
source ~/.venvs/pkgmgr/bin/activate
make setup
args:
chdir: "{{ pkgmgr_install_path }}"
chdir: "{{ PKGMGR_INSTALL_PATH }}"
executable: /bin/bash
become: true

View File

@@ -1,3 +1,3 @@
directories:
repositories: "{{repositories_directory}}"
binaries: "{{binaries_directory}}"
repositories: "{{ PKGMGR_REPOSITORIES_DIR }}"
binaries: "{{ PKGMGR_BINARIES_DIR }}"

View File

@@ -2,16 +2,16 @@
# Variables for Kevin's Package Manager installation
# The Git repository URL for Kevin's Package Manager
pkgmgr_repo_url: "https://github.com/kevinveenbirkenbach/package-manager.git"
# Directory which contains all Repositories managed by Kevin's Package Manager
repositories_directory: "/opt/Repositories/"
# The directory where the repository will be cloned
pkgmgr_install_path: "{{repositories_directory}}github.com/kevinveenbirkenbach/package-manager"
# File containing the configuration
pkgmgr_config_path: "{{pkgmgr_install_path}}/config/config.yaml"
PKGMGR_REPO_URL: "https://github.com/kevinveenbirkenbach/package-manager.git"
# The directory where executable aliases will be installed (ensure it's in your PATH)
binaries_directory: "/usr/local/bin"
PKGMGR_BINARIES_DIR: "/usr/local/bin"
# Directory which contains all Repositories managed by Kevin's Package Manager
PKGMGR_REPOSITORIES_DIR: "/opt/Repositories/"
# The directory where the repository will be cloned
PKGMGR_INSTALL_PATH: "{{ [ PKGMGR_REPOSITORIES_DIR, 'github.com/kevinveenbirkenbach/package-manager' ] | path_join }}"
# File containing the configuration
PKGMGR_CONFIG_PATH: "{{ [ PKGMGR_INSTALL_PATH, 'config/config.yaml' ] | path_join }}"