Replaces the minimal project description with a comprehensive README including a component overview table, quick start instructions, common Ansible operations, and links to detailed documentation. Aligns with Red Panda Approval™ standards.
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
---
|
|
- name: Stage Kernos release tarball
|
|
hosts: localhost
|
|
gather_facts: false
|
|
vars:
|
|
archive_path: "{{rel_dir}}/kernos_{{kernos_rel}}.tar"
|
|
kernos_repo_url: "ssh://robert@clio.helu.ca:18677/mnt/dev/kernos"
|
|
kernos_repo_dir: "{{repo_dir}}/kernos"
|
|
|
|
tasks:
|
|
- name: Ensure release directory exists
|
|
file:
|
|
path: "{{rel_dir}}"
|
|
state: directory
|
|
mode: '755'
|
|
|
|
- name: Ensure repo directory exists
|
|
file:
|
|
path: "{{repo_dir}}"
|
|
state: directory
|
|
mode: '755'
|
|
|
|
- name: Clone Kernos repository if not present
|
|
ansible.builtin.git:
|
|
repo: "{{kernos_repo_url}}"
|
|
dest: "{{kernos_repo_dir}}"
|
|
version: "{{kernos_rel}}"
|
|
accept_hostkey: true
|
|
register: git_clone
|
|
ignore_errors: true
|
|
|
|
- name: Fetch all remote branches and tags
|
|
ansible.builtin.command: git fetch --all
|
|
args:
|
|
chdir: "{{kernos_repo_dir}}"
|
|
when: git_clone is not changed
|
|
|
|
- name: Pull latest changes
|
|
ansible.builtin.command: git pull
|
|
args:
|
|
chdir: "{{kernos_repo_dir}}"
|
|
when: git_clone is not changed
|
|
|
|
- name: Create Kernos archive for specified release
|
|
ansible.builtin.command: git archive -o "{{archive_path}}" "{{kernos_rel}}"
|
|
args:
|
|
chdir: "{{kernos_repo_dir}}" |