Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to FreeBSD 14 #3

Merged
merged 1 commit into from
Mar 15, 2024
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
3 changes: 2 additions & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- ocluster
- docker
- { role: base-image, version: "busybox", user_name: opam, zfs_pool: "obuilder", default: false }
- { role: base-image, version: "4.14.1", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "4.14.2", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "5.0.0", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "5.1.1", user_name: opam, zfs_pool: "obuilder" , default: true }

2 changes: 1 addition & 1 deletion roles/base-image/files/jail
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mkdir -p $1 || error "mkdir failed for $1"
test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR

if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then
export BSDINSTALL_DISTSITE="https://download.freebsd.org/ftp/releases/amd64/amd64/13.2-RELEASE"
export BSDINSTALL_DISTSITE="https://download.freebsd.org/ftp/releases/amd64/amd64/14.0-RELEASE"
fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST"
fi

Expand Down
6 changes: 3 additions & 3 deletions roles/base-image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@

- name: Create setup script
copy:
dest: "/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs/usr/home/{{ user_name }}/freebsd-ocaml.sh"
dest: "/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs/home/{{ user_name }}/freebsd-ocaml.sh"
mode: u+rwx,g+rx,o+rx
content: |
#!/bin/sh
cd /usr/home/opam
cd /home/opam
touch .hushlogin
sed -i "" 's/^[^#]*fortune/# &/' .profile .login
echo "OPAMCONFIRMLEVEL=unsafe-yes; export OPAMCONFIRMLEVEL" >> .profile
Expand All @@ -72,7 +72,7 @@
when: version != "busybox"

- name: Run freebsd-ocaml.sh script in jail /{{ zfs_pool }}/base-image/{{ base_image }}/rootfs as user {{ user_name }} for {{ version }}
shell: jail -c name=base-image path=/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs host=inherit ip6=inherit ip4=inherit mount.devfs exec.jail_user=opam command=/usr/home/opam/freebsd-ocaml.sh
shell: jail -c name=base-image path=/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs host=inherit ip6=inherit ip4=inherit mount.devfs exec.jail_user=opam command=/home/opam/freebsd-ocaml.sh
when: version != "busybox"

- name: Unmount devfs
Expand Down