Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role fails when applied to an Ubuntu AMI #56

Closed
jsf9k opened this issue Jul 10, 2024 · 0 comments · Fixed by #57
Closed

Role fails when applied to an Ubuntu AMI #56

jsf9k opened this issue Jul 10, 2024 · 0 comments · Fixed by #57
Assignees
Labels
bug This issue or pull request addresses broken functionality

Comments

@jsf9k
Copy link
Member

jsf9k commented Jul 10, 2024

🐛 Summary

This Ansible role fails when building Ubuntu-based AMIs. See this build, for instance.

The problem is that the agent is pre-installed via snap on the official Ubuntu AMIs for recent versions of Ubuntu. In fact, according to the documentation from AWS, the SSM Agent should be installed via snap on all the Ubuntu versions that we support.

Expected behavior

I expect the role to cleanly install the SSM agent when building Ubuntu-based AMIs.

Any helpful log output or screenshots

2024-07-08T21:35:50Z:     amazon-ebs.nessus: TASK [amazon_ssm_agent : Download and install amazon-ssm-agent deb package] ****
2024-07-08T21:35:54Z:     amazon-ebs.nessus: fatal: [default]: FAILED! => {"changed": false, "msg": "dpkg --force-confdef --force-confold -i /home/ubuntu/.ansible/tmp/ansible-tmp-1720474550.5386984-3234-49069457483534/amazon-ssm-agent_zlbs2yg.deb failed", "stderr": "dpkg: error processing archive /home/ubuntu/.ansible/tmp/ansible-tmp-1720474550.5386984-3234-49069457483534/amazon-ssm-agent_zlbs2yg.deb (--install):\n new amazon-ssm-agent package pre-installation script subprocess returned error exit status 1\nErrors were encountered while processing:\n /home/ubuntu/.ansible/tmp/ansible-tmp-1720474550.5386984-3234-49069457483534/amazon-ssm-agent_zlbs2yg.deb\n", "stderr_lines": ["dpkg: error processing archive /home/ubuntu/.ansible/tmp/ansible-tmp-1720474550.5386984-3234-49069457483534/amazon-ssm-agent_zlbs2yg.deb (--install):", " new amazon-ssm-agent package pre-installation script subprocess returned error exit status 1", "Errors were encountered while processing:", " /home/ubuntu/.ansible/tmp/ansible-tmp-1720474550.5386984-3234-49069457483534/amazon-ssm-agent_zlbs2yg.deb"], "stdout": "Selecting previously unselected package amazon-ssm-agent.\n(Reading database ... 109326 files and directories currently installed.)\nPreparing to unpack .../amazon-ssm-agent_zlbs2yg.deb ...\nPreparing for install\n-> Systemd detected\nactive\namazon-ssm-agent  3.3.131.0  7994   latest/stable/…  aws**        classic\n-> Amazon-ssm-agent is installed in this instance by snap, please use snap to update or uninstall.\n", "stdout_lines": ["Selecting previously unselected package amazon-ssm-agent.", "(Reading database ... 109326 files and directories currently installed.)", "Preparing to unpack .../amazon-ssm-agent_zlbs2yg.deb ...", "Preparing for install", "-> Systemd detected", "active", "amazon-ssm-agent  3.3.131.0  7994   latest/stable/…  aws**        classic", "-> Amazon-ssm-agent is installed in this instance by snap, please use snap to update or uninstall."]}
@jsf9k jsf9k added the bug This issue or pull request addresses broken functionality label Jul 10, 2024
@jsf9k jsf9k self-assigned this Jul 10, 2024
@jsf9k jsf9k moved this to In Progress in CyHy System Jul 10, 2024
@jsf9k jsf9k mentioned this issue Jul 10, 2024
8 tasks
@jsf9k jsf9k closed this as completed in #57 Sep 14, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in CyHy System Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant