File tree Expand file tree Collapse file tree 4 files changed +54
-4
lines changed
Expand file tree Collapse file tree 4 files changed +54
-4
lines changed Original file line number Diff line number Diff line change 1+ # Software collections offer latest versions of programming languages
2+ collections_enabled : false
3+
4+ # The file that needs the next line
5+ # scl enable rh-git218 bash
6+ collections_rc_file : /etc/skel/.bashrc
7+
8+ # When collections is enabled this is the git you get
9+ base_git : rh-git218
10+
11+ base_git_rpms :
12+ - " {{ base_git }}"
13+ - " {{ base_git }}-git-subtree"
14+ - " {{ base_git }}-git-lfs"
15+ - " {{ base_git }}-git-svn"
16+ - " {{ base_git }}-perl-Git-SVN"
17+ - " {{ base_git }}-git-cvs"
18+ - " {{ base_git }}-git-p4"
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ platforms:
1313 - name : base-git-ubuntu
1414 image : ubuntu
1515 privileged : True
16- - name : base-git-debian
17- image : maint/debian-systemd
18- privileged : True
1916provisioner :
2017 name : ansible
2118 config_options :
Original file line number Diff line number Diff line change 11---
22# Standards: 0.2
33- hosts : all
4+ vars :
5+ collections_enabled : true
46 roles :
57 - role : base_git
Original file line number Diff line number Diff line change 11---
22
3+ - name : install centos software collections
4+ package :
5+ name : centos-release-scl-rh
6+ state : present
7+ when : collections_enabled and ansible_distribution == 'CentOS'
8+ tags :
9+ - git
10+
11+ - name : enable rhel software collections
12+ command : " yum-config-manager --enable rhel-server-rhscl-{{ ansible_distribution_major_version }}-rpms"
13+ when : collections_enabled and ansible_distribution == 'Red Hat Enterprise Linux'
14+ tags :
15+ - git
16+
17+ - name : Install Git software collection
18+ become : yes
19+ when : collections_enabled and ansible_os_family == 'RedHat'
20+ yum :
21+ name : " {{ base_git_rpms }}"
22+ state : present
23+ update_cache : yes
24+ tags :
25+ - git
26+
27+ - name : Enable Git software collection
28+ file :
29+ src : " /opt/rh/{{ base_git }}/enable"
30+ path : /etc/profile.d/rh-git.sh
31+ state : link
32+ when : collections_enabled and ansible_os_family == 'RedHat'
33+ tags :
34+ - git
35+
336- name : Install Git from yum repo
437 become : yes
5- when : ansible_os_family == 'RedHat'
38+ when : not collections_enabled and ansible_os_family == 'RedHat'
639 yum :
740 name : git
841 state : present
You can’t perform that action at this time.
0 commit comments