AWS' Linux 2 has a facility "Amazon Linux Extras" which provides additional repos for assorted things (nginx, php, mariadb, etc. etc.).
I'm surprised that I can't find an Ansible module(s) for this feature. I found an repo in github for this, but it's empty.
I can work around this by hand crafting yum_repository module tasks. That demands reverse engineering what AWS's CLI command (aka amazon-linux-extras install ...) is doing. Or I could run that command directly, but that of course will trigger a change every time I run the playbook.
Any suggestions?
A reasonable work around, until a module shows up for amazon-linux-extras.
- command: amazon-linux-extras install nginx1.12=latest -y
args:
creates: /sbin/nginx
The creates
arg. is the hack to make commands the task reasonably idempotent.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With