---

# Auto-generated with Jsonnet from apptainer.jsonnet
# Do NOT edit!!

- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/bazel.sif"
      removes: "{{ xdg_dir.libexec_dir }}/bazel.sif"
    name: "apptainer | Clean old bazel.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/bazel.sif docker://gcr.io/bazel-public/bazel:7.0.0"
      creates: "{{ xdg_dir.libexec_dir }}/bazel.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build bazel.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts  \
            {{ xdg_dir.libexec_dir }}/bazel.sif bazel "$@"
      dest: "{{ xdg_dir.bin_home }}/bazel"
      mode: "755"
    name: "apptainer | Create bazel-apptainer launch script"
  name: "apptainer | Create bazel environment"
  tags: "bazel-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/asciidoctor.sif"
      removes: "{{ xdg_dir.libexec_dir }}/asciidoctor.sif"
    name: "apptainer | Clean old asciidoctor.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/asciidoctor.sif docker://docker.io/asciidoctor/docker-asciidoctor:1.60.0"
      creates: "{{ xdg_dir.libexec_dir }}/asciidoctor.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build asciidoctor.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv  \
            {{ xdg_dir.libexec_dir }}/asciidoctor.sif "$(basename "$0")" "$@"
      dest: "{{ xdg_dir.bin_home }}/asciidoctor"
      mode: "755"
    name: "apptainer | Create asciidoctor-apptainer launch script"
  name: "apptainer | Create asciidoctor environment"
  tags: "asciidoctor-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/opam.sif"
      removes: "{{ xdg_dir.libexec_dir }}/opam.sif"
    name: "apptainer | Clean old opam.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/opam.sif docker://docker.io/ocaml/opam:alpine-ocaml-5.2"
      creates: "{{ xdg_dir.libexec_dir }}/opam.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build opam.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv --env OPAMROOT="${OPAMROOT:-{{ xdg_dir.data_home }}/opam}" \
            {{ xdg_dir.libexec_dir }}/opam.sif opam "$@"
      dest: "{{ xdg_dir.bin_home }}/opam"
      mode: "755"
    name: "apptainer | Create opam-apptainer launch script"
  name: "apptainer | Create opam environment"
  tags: "opam-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/terraform.sif"
      removes: "{{ xdg_dir.libexec_dir }}/terraform.sif"
    name: "apptainer | Clean old terraform.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/terraform.sif docker://docker.io/hashicorp/terraform:1.6.6"
      creates: "{{ xdg_dir.libexec_dir }}/terraform.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build terraform.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv --env CHECKPOINT_DISABLE=true --env DISABLE_VERSION_CHECK=true \
            {{ xdg_dir.libexec_dir }}/terraform.sif terraform "$@"
      dest: "{{ xdg_dir.bin_home }}/terraform"
      mode: "755"
    name: "apptainer | Create terraform-apptainer launch script"
  name: "apptainer | Create terraform environment"
  tags: "terraform-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/vault.sif"
      removes: "{{ xdg_dir.libexec_dir }}/vault.sif"
    name: "apptainer | Clean old vault.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/vault.sif docker://docker.io/hashicorp/vault:1.15.4"
      creates: "{{ xdg_dir.libexec_dir }}/vault.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build vault.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv --env CHECKPOINT_DISABLE=true --env DISABLE_VERSION_CHECK=true \
            {{ xdg_dir.libexec_dir }}/vault.sif vault "$@"
      dest: "{{ xdg_dir.bin_home }}/vault"
      mode: "755"
    name: "apptainer | Create vault-apptainer launch script"
  name: "apptainer | Create vault environment"
  tags: "vault-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/consul.sif"
      removes: "{{ xdg_dir.libexec_dir }}/consul.sif"
    name: "apptainer | Clean old consul.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/consul.sif docker://docker.io/hashicorp/consul:1.17.1"
      creates: "{{ xdg_dir.libexec_dir }}/consul.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build consul.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv  \
            {{ xdg_dir.libexec_dir }}/consul.sif consul "$@"
      dest: "{{ xdg_dir.bin_home }}/consul"
      mode: "755"
    name: "apptainer | Create consul-apptainer launch script"
  name: "apptainer | Create consul environment"
  tags: "consul-apptainer"
- block:
  - command:
      cmd: "rm -rf {{ xdg_dir.libexec_dir }}/nomad.sif"
      removes: "{{ xdg_dir.libexec_dir }}/nomad.sif"
    name: "apptainer | Clean old nomad.sif file"
  - command:
      cmd: "/usr/bin/apptainer pull {{ xdg_dir.libexec_dir }}/nomad.sif docker://docker.io/hashicorp/nomad:1.7.2"
      creates: "{{ xdg_dir.libexec_dir }}/nomad.sif"
      removes: "/usr/bin/apptainer"
    name: "apptainer | Pull and build nomad.sif file"
  - copy:
      content: |
        #!/bin/sh
        TERM=xterm-256color \
          exec apptainer --silent --quiet exec \
            --ipc --no-eval --no-privs --unsquash --userns --uts --pid --cleanenv  \
            {{ xdg_dir.libexec_dir }}/nomad.sif nomad "$@"
      dest: "{{ xdg_dir.bin_home }}/nomad"
      mode: "755"
    name: "apptainer | Create nomad-apptainer launch script"
  name: "apptainer | Create nomad environment"
  tags: "nomad-apptainer"
- file:
    dest: "{{ xdg_dir.bin_home }}/asciidoctor-{{ item }}"
    src: "./asciidoctor"
    state: "link"
  loop:
  - "confluence"
  - "epub3"
  - "fb2"
  - "pdf"
  - "pdf-optimize"
  - "reducer"
  - "revealjs"
  - "safe"
  name: "apptainer | Symlink asciidoctor-* executables"
  tags: "asciidoctor-apptainer"
