-
Notifications
You must be signed in to change notification settings - Fork 69
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
Use local epel mirrorlist #142
Conversation
I didn't know you could put newlines in like that? |
Tested it on plana11. See [repository] OPTIONS section. The other way to maintain this would be to create separate local files containing mirror URLs |
epel_repos: | ||
epel: | ||
name: "Extra Packages for Enterprise Linux" | ||
baseurl: "{{ epel_mirror_baseurl }}/{{ ansible_distribution_major_version }}/$basearch" | ||
mirrorlist: "{{ epel_mirrorlist }}/metalink?repo=epel-{{ ansible_distribution_major_version }}&arch=$basearch" | ||
baseurl: "{{ epel_mirror_baseurl }}/{{ ansible_distribution_major_version }}/$basearch\nhttp://mirrors.cat.pdx.edu/epel/{{ ansible_distribution_major_version }}/$basearch\nhttp://mirror.pnl.gov/epel/{{ ansible_distribution_major_version }}/$basearch\nhttp://fedora-epel.mirror.lstn.net/{{ ansible_distribution_major_version }}/$basearch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we instead have ansible manage a file, put that file on the remote and then point to it here in baseurl?
All this put into one string is difficult to parse, IMHO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, a separate file sounds a lot saner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A template might be useful here:
http://docs.ansible.com/ansible/template_module.html
fdec37c
to
627e915
Compare
Suggestions on a cleaner way to do this are welcome |
@@ -16,6 +16,12 @@ | |||
register: epel_repo | |||
with_dict: epel_repos | |||
|
|||
- name: Configure local epel mirrorlists | |||
template: src={{ item }} dest=/etc/yum.repos.d/{{ item }} owner=root group=root mode=0644 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I prefer this kind of formatting:
template:
src: "{{ item }}"
dest: "/etc/yum.repos.d/{{ item }}"
...
I think it's easier to read and makes for better diffs if/when we ever change this code.
All I had was a style nitpick, everything else here looks good to me. |
627e915
to
be59304
Compare
Signed-off-by: dgalloway <[email protected]>
be59304
to
537e924
Compare
thanks @djgalloway ! |
Related to:
http://tracker.ceph.com/issues/12739
http://tracker.ceph.com/issues/12778