I'm trying to install the p7zip
package after launching an Amazon Linux-based EC2 instance in AWS via the "User Data" feature (using cloud-init
):
#cloud-config
repo_update: true
repo_upgrade: all
packages:
- p7zip
However since p7zip
isn't available in the normal repos and requires EPEL to be enabled, it does not appear to be fetching the package properly.
My question is: using cloud-init
, how do I enable EPEL before fetching packages when initialising the EC2 instance?