Skip to content
Snippets Groups Projects
Commit af7831df authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

adding a force cache update task in case the yum repositories change

parent f54eb283
No related branches found
No related tags found
1 merge request!335Version pinning and enableing the upgrade role to run at all times
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
- monashhpc_base.repo - monashhpc_base.repo
- monashhpc_others.repo - monashhpc_others.repo
- epel.repo - epel.repo
register: addingrepos
- name: get enabled repos - name: get enabled repos
#shell: yum repolist | grep -v "repo id" | grep -v "Loaded plugins" | head -n -1 | cut -f 1 -d '/' | sed -s 's/\!//' #shell: yum repolist | grep -v "repo id" | grep -v "Loaded plugins" | head -n -1 | cut -f 1 -d '/' | sed -s 's/\!//'
shell: yum repolist all | grep enabled | cut -f 1 -d '/' | sed -s 's/\!//' shell: yum repolist all | grep enabled | cut -f 1 -d '/' | sed -s 's/\!//'
...@@ -80,3 +81,13 @@ ...@@ -80,3 +81,13 @@
apt: update_cache=True apt: update_cache=True
become: true become: true
when: ansible_os_family=="Debian" when: ansible_os_family=="Debian"
- name: force refresh of the repository cache
shell: |
yum clean all
yum updateinfo
yum makecache
become: true
when: addingrepos.changed
args:
warn: False
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment