Comments (8)
Looking more at this, think this might be an issue specific to Amazon Linux. It is RHEL based with yum but I am running AL2 and I imagine this thinks 2 is the RHEL release, when its just the Amazon Linux version. I assumed EPEL could be used here but maybe this is ill advised? Will need to dig a bit deeper.
from ansible-role-repo-epel.
output from cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2:-:internal"
HOME_URL="https://amazonlinux.com/"
VARIANT="internal"
from ansible-role-repo-epel.
Looks like epel is recommended to be installed differently for AL2
sudo amazon-linux-extras install epel -y
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/
Any interest in a PR adding support for AL2? Just need some rough guidance on how you'd like to achieve that if so. Probably just guards on the main tasks, or maybe separate task files, one for AL2 and one for everyone else?
from ansible-role-repo-epel.
also see recommendations to use rhel 7
https://sysadminxpert.com/install-epel-repository-on-linux/#EPEL_Repository_for_Amazon_Linux
On my AL2 machine, epel is missing from amazon-linux-extras
, might be better to take this approach
$ sudo amazon-linux-extras install epel -y
Topic epel is not found.
from ansible-role-repo-epel.
Have done some more tinkering, I now have:
- name: gather os specific variables
include_vars: "{{ item }}"
with_first_found:
- "os_vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
- "os_vars/{{ ansible_distribution }}.yml"
tags: ["always"]
as a pretask, and I made a file in os_vars/Amazon-2.yml
that contains:
epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
epel_repo_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"
and then I import the role as:
- name: enable epel on RHEL systems
import_role:
name: geerlingguy.repo-epel
become: yes
when: configure_epel and ansible_os_family == "RedHat"
tags: ["epel"]
However, this gives me the following error:
TASK [geerlingguy.repo-epel : Check if EPEL repo is already configured.] *************************************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => changed=false
module_stderr: ''
module_stdout: ''
msg: |-
MODULE FAILURE
See stdout/stderr for the exact error
rc: 1
If i run the role with become: no
I get the following error:
TASK [geerlingguy.repo-epel : Import EPEL GPG key.] *************************************************************************************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => changed=false
attempts: 5
msg: |-
error: cannot open Packages index using db5 - Permission denied (13)
error: cannot open Packages database in /var/lib/rpm
error: /tmp/tmpDJkiX8: key 1 import failed.
Interesting note is that the stat
succeeds with become: no
, but not with become: yes
from ansible-role-repo-epel.
The module failure stuff when using become
is due to locked down sudo permissions, ended up having to set ANSIBLE_EXECUTABLE
, and it appears that after doing that, the role ran successfully.
With that fixed, that just leaves configuring the role to use the right EPEL URL for AL2.
from ansible-role-repo-epel.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
from ansible-role-repo-epel.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
from ansible-role-repo-epel.
Related Issues (20)
- official epel_repo_url appears to have changed HOT 1
- unable to re-generate /etc/yum.repos.d/epel*.repo file HOT 3
- Minimum ansible version HOT 1
- Wrong detection if EPEL repo enabled HOT 4
- the docker centos7 image has already installed epel (travis-ci)
- Install EPEL Task Broken in Ansible 2.5 HOT 2
- Docker image already has EPEL installed HOT 1
- The conditional check 'result.rc == 0' failed HOT 3
- Failure downloading https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm, Request failed: <urlopen error [SSL] unknown error (_ssl.c:618) HOT 3
- enable powertools in centos8 HOT 2
- Add ability to disable epel repo after install
- Installing epel-repo times out on install CentOS 8
- EPEL GPG key not found on rhel/ubi8 HOT 8
- Tests are not actually testing the role HOT 3
- Not a valid key /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 HOT 1
- Import EPEL GPG key: cannot open Packages index using db5 HOT 2
- Once disabled, epel repository cannot be re-enabled HOT 1
- ERROR! couldn't resolve module/action 'ini_file'
- Planned support for EL9? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-repo-epel.