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
27 changes: 21 additions & 6 deletions packer/linux/ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
---
agent_root_dir: "/opt/semaphore/agent"
agent_hooks_dir: "{{ agent_root_dir }}/hooks"
agent_url: "https://github.com/semaphoreci/agent/releases/download/{{ agent_version }}/agent_Linux_x86_64.tar.gz"

# Architecture mappings (ansible_architecture returns x86_64 or aarch64)
arch_map:
x86_64: "x86_64"
aarch64: "arm64"
arch_map_deb:
x86_64: "amd64"
aarch64: "arm64"
arch_map_awscli:
x86_64: "x86_64"
aarch64: "aarch64"

agent_url: "https://github.com/semaphoreci/agent/releases/download/{{ agent_version }}/agent_Linux_{{ arch_map[ansible_architecture] }}.tar.gz"
awscli_version: "2.4.9"
awscli_url: "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-{{ awscli_version }}.zip"
docker_apt_repository: "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable"
awscli_url: "https://awscli.amazonaws.com/awscli-exe-linux-{{ arch_map_awscli[ansible_architecture] }}-{{ awscli_version }}.zip"
docker_apt_repository: >-
deb [arch={{ arch_map_deb[ansible_architecture] }}]
https://download.docker.com/linux/{{ ansible_distribution | lower }}
{{ ansible_distribution_release }} stable
docker_apt_gpg_key: "https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg"
yq_url: "https://github.com/mikefarah/yq/releases/download/v4.16.2/yq_linux_amd64"
yq_url: "https://github.com/mikefarah/yq/releases/download/v4.16.2/yq_linux_{{ arch_map_deb[ansible_architecture] }}"
erlang_gpg_key_url: https://keys.openpgp.org/vks/v1/by-fingerprint/0A9AF2115F4687BD29803A206B73A36E6026DFCA
erlang_gpg_key_checksum: "f06ccb0568a012e751e276c15b733494147fbb0663c79ab77f3574def4767f99"
erlang_gpg_key_checksum: "b78771a394c747e0e72a26a558277edd6869d9cd8a963bdbc57efbe11b59f08d"
erlang_gpg_key_path: /usr/share/keyrings/com.rabbitmq.team.gpg
erlang_gpg_key_source_path: "{{ erlang_gpg_key_path }}.asc"
erlang_repo_mirrors:
Expand All @@ -17,6 +32,6 @@ erlang_repo_mirrors:
erlang_package_specs:
# Pin Erlang 26.2.5.13 across all Ubuntu releases for consistent builds.
default: erlang-base=1:26.2.5.13-1
cloudwatch_agent_url: https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
cloudwatch_agent_url: "https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/{{ arch_map_deb[ansible_architecture] }}/latest/amazon-cloudwatch-agent.deb"
systemd_restart_seconds: 300
apt_hold_patterns: []
2 changes: 1 addition & 1 deletion packer/linux/ansible/roles/erlang/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- name: "Add repository to APT sources list"
ansible.builtin.apt_repository:
repo: >-
deb [arch=amd64 signed-by={{ erlang_gpg_key_path }}]
deb [arch={{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }} signed-by={{ erlang_gpg_key_path }}]
{{ item }}/rabbitmq-erlang/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}
{{ ansible_distribution_release }} main
state: present
Expand Down