Compare commits
No commits in common. "6d60f0346148e1331d128b7edb04ac3d28f6f85c" and "3a5df6a91143f93700e30557a2101831c46e0d89" have entirely different histories.
6d60f03461
...
3a5df6a911
5 changed files with 6 additions and 40 deletions
|
@ -74,11 +74,6 @@
|
||||||
- auth
|
- auth
|
||||||
- docker-container
|
- docker-container
|
||||||
|
|
||||||
- role: deploy_container_habitica
|
|
||||||
tags:
|
|
||||||
- habitica
|
|
||||||
- docker-container
|
|
||||||
|
|
||||||
- role: deploy_container_mailarchive
|
- role: deploy_container_mailarchive
|
||||||
tags:
|
tags:
|
||||||
- mailarchive
|
- mailarchive
|
||||||
|
|
|
@ -5,8 +5,9 @@ ssh_key_url: "https://skulldev.de/Skull-IT/trusted-ssh-keys/raw/branch/main/trus
|
||||||
|
|
||||||
image_output_dir: "/tmp/packer_images"
|
image_output_dir: "/tmp/packer_images"
|
||||||
|
|
||||||
debian_iso_url: "https://cdimage.debian.org/mirror/cdimage/archive/12.11.0/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso"
|
debian_iso_url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.11.0-amd64-netinst.iso"
|
||||||
debian_iso_checksum_url: "https://cdimage.debian.org/mirror/cdimage/archive/12.11.0/amd64/iso-cd/SHA256SUMS"
|
debian_iso_checksum_url: "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS"
|
||||||
|
# https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS
|
||||||
debian_iso_filename: "debian-12.11.0-amd64-netinst.iso"
|
debian_iso_filename: "debian-12.11.0-amd64-netinst.iso"
|
||||||
|
|
||||||
ssh_username: "localadmin"
|
ssh_username: "localadmin"
|
||||||
|
|
|
@ -56,51 +56,21 @@
|
||||||
dest: "{{ image_output_dir }}/http/preseed.cfg"
|
dest: "{{ image_output_dir }}/http/preseed.cfg"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Remove old Debian ISO checksums file if exists
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /tmp/debian_sha256sums.txt
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Download Debian ISO checksums
|
- name: Download Debian ISO checksums
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: "{{ debian_iso_checksum_url }}"
|
url: "{{ debian_iso_checksum_url }}"
|
||||||
dest: /tmp/debian_sha256sums.txt
|
dest: /tmp/debian_sha256sums.txt
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
|
||||||
- name: Download Debian ISO checksums
|
|
||||||
ansible.builtin.get_url:
|
|
||||||
url: "{{ debian_iso_checksum_url }}"
|
|
||||||
dest: /tmp/debian_sha256sums.txt
|
|
||||||
mode: '0644'
|
|
||||||
|
|
||||||
- name: Debug - show checksum file content (with special chars visible)
|
|
||||||
ansible.builtin.shell: cat -A /tmp/debian_sha256sums.txt
|
|
||||||
register: checksum_file_content
|
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- debug:
|
|
||||||
var: checksum_file_content.stdout_lines
|
|
||||||
|
|
||||||
- name: Debug - show variable value
|
|
||||||
debug:
|
|
||||||
var: debian_iso_filename
|
|
||||||
|
|
||||||
- name: Extract checksum for ISO
|
- name: Extract checksum for ISO
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
awk '{gsub(/\r/, ""); if ($2 == "{{ debian_iso_filename }}") {print $1; exit}}' /tmp/debian_sha256sums.txt
|
grep "{{ debian_iso_filename }}" /tmp/debian_sha256sums.txt | awk '{ print $1 }'
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
register: debian_iso_checksum_result
|
register: debian_iso_checksum_result
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Fail if checksum not found
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "Could not find SHA256 for {{ debian_iso_filename }} in {{ debian_iso_checksum_url }}"
|
|
||||||
when: (debian_iso_checksum_result.stdout | trim) == ""
|
|
||||||
|
|
||||||
- name: Set fact with full checksum string
|
- name: Set fact with full checksum string
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
debian_iso_checksum: "sha256:{{ debian_iso_checksum_result.stdout | trim }}"
|
debian_iso_checksum: "sha256:{{ debian_iso_checksum_result.stdout }}"
|
||||||
|
|
||||||
- name: Template Packer HCL config
|
- name: Template Packer HCL config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
############
|
############
|
||||||
# Habitica #
|
# Habitica #
|
||||||
############
|
############
|
||||||
container_habitica_version: "latest" # https://hub.docker.com/r/awinterstein/habitica-server/tags
|
container_habitica_version: "latest"
|
||||||
container_habitica_mongo_version: "6.0"
|
container_habitica_mongo_version: "6.0"
|
||||||
container_habitica_domain: "habitica.example.com"
|
container_habitica_domain: "habitica.example.com"
|
||||||
container_habitica_mail_server: "mail.example.com"
|
container_habitica_mail_server: "mail.example.com"
|
||||||
|
|
Loading…
Add table
Reference in a new issue