Refactored git clone to Kevin's Package Manager (Draft not fully tested)

This commit is contained in:
2025-04-01 14:40:04 +02:00
parent 659c24eb14
commit 526f1c952d
21 changed files with 229 additions and 48 deletions

View File

@@ -0,0 +1,43 @@
---
- name: Create installation directory for Kevin's Package Manager
file:
path: "{{ pkgmgr_install_path }}"
state: directory
mode: '0755'
become: yes
when: run_once_package_manager is not defined
- name: Clone Kevin's Package Manager repository
git:
repo: "{{ pkgmgr_repo_url }}"
dest: "{{ pkgmgr_install_path }}"
version: "HEAD"
force: yes
become: yes
when: run_once_package_manager is not defined
- name: Ensure main.py is executable
file:
path: "{{ pkgmgr_install_path }}/main.py"
mode: '0755'
become: yes
when: run_once_package_manager is not defined
- name: create config.yaml
template:
src: config.yaml.j2
dest: "{{pkgmgr_config_path}}"
become: yes
when: run_once_package_manager is not defined
- name: Run the Package Manager install command to create an alias for Kevins package manager
command: "{{ pkgmgr_install_command }}"
args:
chdir: "{{ pkgmgr_install_path }}"
become: yes
when: run_once_package_manager is not defined
- name: run run_once_package_manager tasks once
set_fact:
run_once_package_managerr: true
when: run_once_package_manager is not defined