Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Merge requests
!373
Pipelinefix
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Pipelinefix
pipelinefix
into
master
Overview
0
Commits
20
Pipelines
2
Changes
2
Merged
Andreas Hamacher
requested to merge
pipelinefix
into
master
4 years ago
Overview
0
Commits
20
Pipelines
2
Changes
2
Expand
@chines
please only merge when pipeline has passed :)
fixing cicd pipeline stuff
including centos78 variabled
config_repos now dealing with enabling, disabling AND not changing all the time
the spagetti on slurmd service continues
small tweak to mellanox driver. I need the kmod install on test-lustre, but not the service activation.
0
0
Merge request reports
Viewing commit
b3e8a227
Prev
Next
Show latest version
2 files
+
27
−
38
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
b3e8a227
improved repo handling
· b3e8a227
Andreas Hamacher
authored
4 years ago
roles/config_repos/tasks/main.yml
+
25
−
36
Options
@@ -8,28 +8,6 @@
group
:
root
become
:
True
#- name: remove default repos
# file:
# path: /etc/yum.repos.d/{{ item }}
# state: absent
# become: true
# become_user: root
# with_items:
# - CentOS-Base.repo
# - CentOS-Debuginfo.repo
# - CentOS-fasttrack.repo
# - CentOS-Sources.repo
# - CentOS-Vault.repo
# - foreman.repo
# - puppetlabs.repo
# - rdo-release.repo
# - CentOS-CR.repo
# - CentOS-Media.repo
# - CentOS-OpenStack-kilo.repo
# - epel.repo
# - monashhpc_mellanox.repo
# - epel-testing.repo
# when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == "7"
-
name
:
add our repos
template
:
src={{ item }}.j2 dest=/etc/yum.repos.d/{{ item }}
@@ -45,33 +23,42 @@
#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/\!//'
when
:
ansible_os_family == 'RedHat'
register
:
repolist
register
:
repolist
enabled
check_mode
:
no
changed_when
:
False
args
:
warn
:
False
-
name
:
disable unwanted repos
shell
:
yum-config-manager --disable "{{ item }}"
with_items
:
"
{{
repolist.stdout_lines|difference(yumenablerepo)
}}"
become
:
true
become_user
:
root
ignore_errors
:
true
-
name
:
get disabled repos
shell
:
yum repolist all | grep disabled | cut -f 1 -d '/' | sed -s 's/\!//'
when
:
ansible_os_family == 'RedHat'
register
:
repolistdisabled
check_mode
:
no
changed_when
:
False
args
:
warn
:
False
-
name
:
enable wanted repos
shell
:
yum-config-manager --enable "{{ item }}"
with_items
:
"
{{
yumenablerepo
}}"
#with_items: "{{ repolistenabled.stdout_lines|difference(yumenablerepo) }}"
with_items
:
"
{{
yumenablerepo
|
symmetric_difference(repolistenabled.stdout_lines)
}}"
become
:
true
become_user
:
root
ignore_errors
:
true
#
ignore_errors: true
when
:
ansible_os_family == 'RedHat'
register
:
repoenable
-
name
:
disable unwanted repos
shell
:
yum-config-manager --disable "{{ item }}"
with_items
:
"
{{
repolistenabled.stdout_lines|difference(yumenablerepo)
}}"
become
:
true
become_user
:
root
#ignore_errors: true
when
:
ansible_os_family == 'RedHat'
register
:
repodisable
#- name: Enable epel
# command: yum-config-manager --enable epel
# become: true
# when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
# Use mate DE on systems that have moved to gnome3, since there is no gpu acceleration by default on NeCTAR openstack
# Trusty (Ubuntu 14.04 LTS) needs repos added. Wheezy (Debian Stable) gets mate from backports, Utopic (Ubuntu 14.10) Jessie (Debian testing) and Sid (Debian unstable) get it by default
@@ -89,9 +76,11 @@
apt
:
update_cache=True
become
:
true
when
:
ansible_os_family=="Debian"
-
name
:
force refresh of the repository cache
shell
:
|
yum clean metadata
yum clean all
yum updateinfo
yum makecache
@@ -99,6 +88,6 @@
async
:
600
poll
:
5
check_mode
:
no
when
:
a
ddingrepos.changed and a
nsible_os_family == 'RedHat'
when
:
ansible_os_family == 'RedHat'
and ( addingrepos.changed or repoenable.changed or repodisable.changed)
args
:
warn
:
False
Loading