Skip to content

Install via official package repository for Ubuntu#76

Open
jsf9k wants to merge 3 commits into
developfrom
improvement/use-prebuilt-ubuntu-packages
Open

Install via official package repository for Ubuntu#76
jsf9k wants to merge 3 commits into
developfrom
improvement/use-prebuilt-ubuntu-packages

Conversation

@jsf9k
Copy link
Copy Markdown
Member

@jsf9k jsf9k commented Jun 2, 2026

🗣 Description

This pull request updates the role to install on Ubuntu via the official package repository.

💭 Motivation and context

The aws/efs-utils folks now offer a package repository with pre-built *.debs, but currently only for Ubuntu 22.04 and 24.04. We may as well use these packages to save us the time, effort, and heartache of building the packages from source.

🧪 Testing

All automated tests pass.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

@jsf9k jsf9k self-assigned this Jun 2, 2026
@jsf9k jsf9k added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Jun 2, 2026
The aws/efs-utils folks now offer a package repo with
pre-built *.debs, but only for Ubuntu.  See aws/efs-utils#111 for more
details.
@github-actions github-actions Bot added the ansible Pull requests that update Ansible code label Jun 2, 2026
@jsf9k jsf9k force-pushed the improvement/use-prebuilt-ubuntu-packages branch from db84328 to d545691 Compare June 2, 2026 14:58
@jsf9k jsf9k marked this pull request as ready for review June 2, 2026 16:05
@jsf9k jsf9k requested review from dav3r and mcdonnnj as code owners June 2, 2026 16:05
@jsf9k jsf9k enabled auto-merge June 2, 2026 16:05
@jsf9k jsf9k requested a review from Copilot June 2, 2026 16:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the role’s Ubuntu installation path to use AWS’s hosted APT repository for amazon-efs-utils instead of building .deb packages from source, aligning with upstream’s newly available prebuilt packages for supported Ubuntu releases.

Changes:

  • Removed Ubuntu Jammy-specific build-from-source variables.
  • Added Ubuntu-specific install tasks to add the AWS efs-utils APT repo and install amazon-efs-utils.
  • Added a handler intended to refresh the package cache.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
vars/Ubuntu_jammy.yml Removes Jammy build-from-source variables now that Ubuntu installs via repo.
tasks/install_Ubuntu.yml Adds the AWS APT repo and installs amazon-efs-utils on Ubuntu.
handlers/main.yml Introduces a package-cache update handler used by the Ubuntu install flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tasks/install_Ubuntu.yml
Comment on lines +9 to +27
- name: Add the official aws/efs-utils repo
ansible.builtin.deb822_repository:
components:
- main
name: efs-utils
signed_by: https://amazon-efs-utils.aws.com/efs-utils-armored.gpg
suites:
- "{{ ansible_facts['distribution_version'] }}"
uris:
- >-
https://amazon-efs-utils.aws.com/repo/deb/ubuntu/{{
ansible_facts['distribution_version'] }}
notify:
- Update the package cache

# We need the handler that updates the apt package cache to run
# now if it is necessary.
- name: Flush handlers
ansible.builtin.meta: flush_handlers
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ansible-lint will complain about the suggested solution since it wants tasks that run on change to be in handlers.

Comment thread tasks/install_Ubuntu.yml
Comment on lines +10 to +16
ansible.builtin.deb822_repository:
components:
- main
name: efs-utils
signed_by: https://amazon-efs-utils.aws.com/efs-utils-armored.gpg
suites:
- "{{ ansible_facts['distribution_version'] }}"
Copy link
Copy Markdown
Member Author

@jsf9k jsf9k Jun 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see commit f824239.

Comment thread handlers/main.yml
Comment on lines +2 to +4
- name: Update the package cache
ansible.builtin.package:
update_cache: true
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep the functionality generic here, in the event that aws/efs-utils ever offers pre-built packages for, e.g., RedHat platforms

@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Jun 2, 2026
We use ansible.builtin.deb822_repository in this role (for Ubuntu),
and this module was introduced in ansible-core 2.15.
@jsf9k jsf9k force-pushed the improvement/use-prebuilt-ubuntu-packages branch from 5957746 to f824239 Compare June 2, 2026 17:35
@jsf9k jsf9k requested a review from felddy June 2, 2026 18:04
We no longer build the deb packages for Ubuntu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ansible Pull requests that update Ansible code dependencies Pull requests that update a dependency file improvement This issue or pull request will add or improve functionality, maintainability, or ease of use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants