Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions src/firewheel_repo_linux/linux/INSTALL

This file was deleted.

63 changes: 63 additions & 0 deletions src/firewheel_repo_linux/linux/INSTALL/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
- name: Create VM resources directory
ansible.builtin.file:
path: "{{ download_dir }}"
state: directory

- name: Create parent directories
ansible.builtin.file:
path: "{{ download_dir }}/{{ item.parent }}"
state: directory
loop: "{{ files }}"

- name: Download and verify files
ansible.builtin.get_url:
url: "{{ item.url }}"
dest: "{{ download_dir }}/{{ item.parent }}/{{ item.dest }}"
checksum: "sha256:{{ item.sha256 }}"
loop: "{{ files }}"

- name: Generate SSH key pair (if applicable)
ansible.builtin.openssh_keypair:
path: "{{ ssh_profile.path }}/id_rsa"
type: rsa
size: 2048
when: ssh_profile.ssh_keypair | default(false)

- name: Add public key to authorized_keys
ansible.builtin.copy:
content: "{{ lookup('file', ssh_profile.path + '/id_rsa.pub') }}"
dest: "{{ ssh_profile.path }}/authorized_keys"
when: ssh_profile.ssh_keypair | default(false)

- name: Create SSH config file
ansible.builtin.copy:
content: |
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
ForwardX11Trusted yes
dest: "{{ ssh_profile.path }}/config"
when: ssh_profile.ssh_keypair | default(false)

- name: Set permissions for SSH files
ansible.builtin.file:
path: "{{ ssh_profile.path }}/{{ item.file }}"
mode: "{{ item.mode }}"
loop: "{{ ssh_profile.permissions }}"
when: ssh_profile.ssh_keypair | default(false)

- name: Compress profiles into tarball
ansible.builtin.archive:
path:
- "{{ download_dir }}/profiles"
- "{{ ssh_profile.path }}"
dest: "{{ download_dir }}/combined_profiles.tgz"
format: gz

- name: Clean up temporary files
ansible.builtin.file:
path:
- "{{ download_dir }}/profiles"
- "{{ ssh_profile.path }}"
state: absent
33 changes: 33 additions & 0 deletions src/firewheel_repo_linux/linux/INSTALL/vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
download_dir: "{{ mc_dir }}/vm_resources"
files:
- parent: "profiles"
dest: ".vimrc"
url: "https://github.com/amix/vimrc/raw/3c26776552ecb436bd8090c973435a68dbe8cb62/vimrcs/basic.vim"
sha256: "bde3c8e77682d22bde680919d3416524fbc4e13d8aaf2ed25bcd3bdc3b6875b1"
- parent: "profiles"
dest: ".bashrc"
url: "https://github.com/sudonitesh/beautiful-bash/raw/4ad53ee9d1b0e2104e9dd77ae4f74e71262395d5/.bashrc"
sha256: "19fca5072753f1bf8da1d4770d7dfe409c84e29ad21bbe92abbe37b7232df249"
- parent: "profiles"
dest: "tmux-cssh"
url: "https://gitlab.com/peikk0/tmux-cssh/-/raw/a35957f7d9a0dbfd296b73dbb6f56ee4c193dc56/tmux-cssh"
sha256: "cd44ed3321abc190a0a128b944b004857770e8ea18c03952e63a234cb3056098"

ssh_profile:
path: "{{ download_dir }}/.ssh"
ssh_keypair: true
permissions:
- file: "authorized_keys"
mode: "0600"
- file: "config"
mode: "0600"

required_files:
- destination: "{{ download_dir }}/combined_profiles.tgz"
- destination: "{{ download_dir }}/tmux-cssh"
- destination: "{{ mc_dir }}/vm_resources/chpasswd.sh"
- destination: "{{ mc_dir }}/vm_resources/configure_ips.sh"
- destination: "{{ mc_dir }}/vm_resources/set_hostname.sh"
- destination: "{{ mc_dir }}/vm_resources/set_netplan_interfaces.sh"
- destination: "{{ mc_dir }}/vm_resources/set_ulimit.sh"
1 change: 1 addition & 0 deletions src/firewheel_repo_linux/ubuntu/bionic/INSTALL/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
4 changes: 4 additions & 0 deletions src/firewheel_repo_linux/ubuntu/bionic/INSTALL/vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
required_files:
- destination: "{{ mc_dir }}/images/ubuntu-18.04.5-server-amd64.qcow2.xz"
- destination: "{{ mc_dir }}/images/ubuntu-18.04.5-desktop-amd64.qcow2.xz"
87 changes: 0 additions & 87 deletions src/firewheel_repo_linux/ubuntu/jammy/INSTALL

This file was deleted.

31 changes: 31 additions & 0 deletions src/firewheel_repo_linux/ubuntu/jammy/INSTALL/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- name: Create VM resources directory
ansible.builtin.file:
path: "{{ download_dir }}"
state: directory

- name: Create parent directories
ansible.builtin.file:
path: "{{ download_dir }}/{{ item.name }}"
state: directory
loop: "{{ parents }}"

- name: Download and verify files
ansible.builtin.get_url:
url: "{{ item.url }}"
dest: "{{ download_dir }}/{{ item.parent }}/{{ item.dest }}"
checksum: "sha256:{{ item.sha256 }}"
loop: "{{ files }}"

- name: Compress parent directories into tarballs
ansible.builtin.archive:
path: "{{ download_dir }}/{{ item.name }}"
dest: "{{ download_dir }}/{{ item.tarball }}"
format: gz
loop: "{{ parents }}"

- name: Remove parent directories
ansible.builtin.file:
path: "{{ download_dir }}/{{ item.name }}"
state: absent
loop: "{{ parents }}"
20 changes: 20 additions & 0 deletions src/firewheel_repo_linux/ubuntu/jammy/INSTALL/vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
download_dir: "{{ mc_dir }}/vm_resources/debs"
files:
- parent: "pssh_debs"
dest: "pssh_2.3.4-2_all.deb"
url: "http://archive.ubuntu.com/ubuntu/pool/universe/p/pssh/pssh_2.3.4-2_all.deb"
sha256: "08689810f7f7f87934de47b59c2c9791eeef61059cd45a9388a53035e56d941d"
- parent: "pssh_debs"
dest: "python3-psshlib_2.3.4-2_all.deb"
url: "http://archive.ubuntu.com/ubuntu/pool/universe/p/pssh/python3-psshlib_2.3.4-2_all.deb"
sha256: "8e794c0ae1fa311f4f461ae42fe6d84b5dc8e0e425ce9fa37b2c1345fbc39e7b"

parents:
- name: "pssh_debs"
tarball: "pssh_2.3.4-2_all_debs.tgz"

required_files:
- destination: "{{ download_dir }}/pssh_2.3.4-2_all_debs.tgz"
- destination: "{{ mc_dir }}/images/ubuntu-22.04-server-amd64.qcow2.tgz"
- destination: "{{ mc_dir }}/images/ubuntu-22.04-desktop-amd64.qcow2.tgz"
Loading