Install via official package repository for Ubuntu#76
Conversation
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.
db84328 to
d545691
Compare
There was a problem hiding this comment.
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-utilsAPT repo and installamazon-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.
| - 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 |
There was a problem hiding this comment.
ansible-lint will complain about the suggested solution since it wants tasks that run on change to be in handlers.
| 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'] }}" |
| - name: Update the package cache | ||
| ansible.builtin.package: | ||
| update_cache: true |
There was a problem hiding this comment.
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
We use ansible.builtin.deb822_repository in this role (for Ubuntu), and this module was introduced in ansible-core 2.15.
5957746 to
f824239
Compare
We no longer build the deb packages for Ubuntu.
🗣 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