Addressing issue and Fixes for packer-based AMI's & Compatibility #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses a series of issues encountered while creating a Packer-based AMI for the Jenkins controller and agent. The changes include configuration updates, compatibility fixes, and module improvements to ensure smooth AMI creation, Jenkins deployment, and Terraform integration.
🧩 Context / Problem Statement
While building Jenkins AMI images using Packer and Ansible, several issues were encountered due to outdated or unsupported configurations and package installation conflicts:
pubkeyacceptedalgorithms
not being recognized.remote_src
parameter in Ansiblescript
module.✅ Changes Implemented
🔧 Packer Configuration
pubkeyacceptedalgorithms
from the SSH configuration to resolve connectivity issues.📦 AWS CLI & Python Environment Fix
pip
-based CLI installation withapt
-based and direct URL-based installation.curl
,unzip
, etc.) are installed via Ansible before CLI installation.🔐 HashiCorp GPG Key Fix
curl -fsSL
for clean, silent fetch.--dearmor
to convert the GPG key to the required binary format.creates
directive in Ansible.🧾 Secret Retrieval Fix
remote_src
parameter from the Ansiblescript
module to fix failure during AWS SSM secret retrieval.🏗️ Jenkins AMI and Terraform Updates
2.492.1
.📸 Screenshots / Logs
Refer to the attached screenshots for:
🧪 Testing
terraform plan
post-AMI creation — only the intended AMI change observed.Request for Review
This PR is ready for review. I’d appreciate feedback on:
Let me know if any changes are needed!