From f222434b75bab2e1018d81e65bd39a2fbc619fc2 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 10 Apr 2018 14:55:07 +1000 Subject: [PATCH 1/7] ansible: centos6 git update --- .../baselayout/tasks/partials/repo/centos6.yml | 5 +++++ ansible/roles/baselayout/vars/main.yml | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml index feac8043a..fb302bc29 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml @@ -20,3 +20,8 @@ yum: name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm" state: present + +- name: install ius + yum: + name: "https://centos6.iuscommunity.org/ius-release.rpm" + state: present diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 03c289031..fab913703 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -27,19 +27,18 @@ ntp_service: { } common_packages: [ - 'automake', - 'bash', - 'libtool', - 'sudo', + 'automake,bash,libtool,sudo', ] # you can either add os family or os to this list (see smartos) # but the playbook chooses os over family - not both packages: { - centos: [ - 'ccache', - 'git', - 'gcc-c++', # even need this on centos6 so ccache has symlinks + centos6: [ + 'ccache,git2u,gcc-c++', # even need gcc on centos6 so ccache has symlinks + ], + + centos7: [ + 'ccache,git,gcc-c++', ], debian7: [ From 8f1bb66ab11afc661908e4157e8690245dcea832 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 10 Apr 2018 15:33:16 +1000 Subject: [PATCH 2/7] ansible: centos6 updates incl devtoolset-6 --- ansible/roles/baselayout/tasks/main.yml | 7 ++++ .../tasks/partials/repo/centos6.yml | 26 +++++--------- ansible/roles/baselayout/vars/main.yml | 34 ++++--------------- .../files/{centos5.monitrc => centos.monitrc} | 0 4 files changed, 22 insertions(+), 45 deletions(-) rename ansible/roles/jenkins-worker/files/{centos5.monitrc => centos.monitrc} (100%) diff --git a/ansible/roles/baselayout/tasks/main.yml b/ansible/roles/baselayout/tasks/main.yml index 1f761d5d6..0498a78b6 100644 --- a/ansible/roles/baselayout/tasks/main.yml +++ b/ansible/roles/baselayout/tasks/main.yml @@ -73,6 +73,13 @@ - gcc - g++ +- name: centos6 | install devtoolset-2 + when: "os == 'centos6'" + yum: + disable_gpg_check: true + name: "devtoolset-2-gcc,devtoolset-2-gcc-c++" + state: present + - name: remove fortune from login shells when: os|stripversion == 'freebsd' lineinfile: diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml index fb302bc29..a24027a24 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml @@ -1,27 +1,17 @@ --- -# -# centos6 - almost getting there -# - -- name: "repo : add scl devtoolset" - yum_repository: - baseurl: http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo - gpgkey: http://ftp.scientificlinux.org/linux/scientific/5x/{{ ansible_architecture }}/RPM-GPG-KEYs/RPM-GPG-KEY-cern - gpgcheck: yes - -- name: "repo : add scl" - yum_repository: - baseurl: http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo - gpgkey: http://ftp.scientificlinux.org/linux/scientific/5x/{{ ansible_architecture }}/RPM-GPG-KEYs/RPM-GPG-KEY-cern - gpgcheck: yes - -- name: install epel +- name: centos6 | install epel yum: name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm" state: present -- name: install ius +- name: centos6 | install ius yum: name: "https://centos6.iuscommunity.org/ius-release.rpm" state: present + +- name: centos6 | install devtoolset-2 repo + get_url: + url: http://people.centos.org/tru/devtools-2/devtools-2.repo + dest: /etc/yum.repos.d/devtools-2.repo + mode: 0644 diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index fab913703..f71313750 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -34,7 +34,8 @@ common_packages: [ # but the playbook chooses os over family - not both packages: { centos6: [ - 'ccache,git2u,gcc-c++', # even need gcc on centos6 so ccache has symlinks + 'centos-release-scl', + 'ccache,git2u,gcc-c++,centos-release-scl,devtoolset-6', # even need gcc on centos6 so ccache has symlinks ], centos7: [ @@ -54,17 +55,11 @@ packages: { ], fedora: [ - 'bzip2', - 'ccache', - 'gcc-c++', - 'git', - 'fontconfig', + 'bzip2,ccache,gcc-c++,git,fontconfig', ], freebsd: [ - 'ccache', - 'git', - 'gmake' + 'ccache,git,gmake' ], rhel72: [ @@ -72,30 +67,15 @@ packages: { ], smartos14: [ - 'gcc48', - 'gcc48-libs', - 'gccmakedep', - 'git', - 'gmake', - 'xz' + 'gcc48,gcc48-libs,gccmakedep,git,gmake,xz' ], smartos15: [ - 'gcc49', - 'gcc49-libs', - 'gccmakedep', - 'git', - 'gmake', - 'xz' + 'gcc49,gcc49-libs,gccmakedep,git,gmake,xz' ], smartos16: [ - 'gcc49', - 'gcc49-libs', - 'gccmakedep', - 'git', - 'gmake', - 'xz' + 'gcc49,gcc49-libs,gccmakedep,git,gmake,xz' ], ubuntu: [ diff --git a/ansible/roles/jenkins-worker/files/centos5.monitrc b/ansible/roles/jenkins-worker/files/centos.monitrc similarity index 100% rename from ansible/roles/jenkins-worker/files/centos5.monitrc rename to ansible/roles/jenkins-worker/files/centos.monitrc From f2fd5fe61b308d14f7763bd989c1796dda5ac370 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 10 Apr 2018 17:03:55 +1000 Subject: [PATCH 3/7] ansible: use /etc/sysconfig for centos6 --- ansible/roles/jenkins-worker/tasks/main.yml | 7 ++ .../{centos.initd.j2 => centos5.initd.j2} | 2 +- .../jenkins-worker/templates/centos6.initd.j2 | 93 +++++++++++++++++++ .../templates/centos6.sysconfig.j2 | 13 +++ ansible/roles/jenkins-worker/vars/main.yml | 12 ++- 5 files changed, 123 insertions(+), 4 deletions(-) rename ansible/roles/jenkins-worker/templates/{centos.initd.j2 => centos5.initd.j2} (92%) create mode 100644 ansible/roles/jenkins-worker/templates/centos6.initd.j2 create mode 100644 ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml index 63cae53ec..7ea68b2e4 100644 --- a/ansible/roles/jenkins-worker/tasks/main.yml +++ b/ansible/roles/jenkins-worker/tasks/main.yml @@ -147,6 +147,13 @@ dest: "{{ jenkins.dest }}" mode: "{{ jenkins.mode|default('0644') }}" +- name: centos6 | render sysconfig into place + when: "os == 'centos6'" + template: + src: "{{ role_path }}/templates/centos6.sysconfig.j2" + dest: "/etc/sysconfig/jenkins" + mode: "0644" + - name: import manifest to svcadm when: os|startswith("smartos") raw: "svccfg import {{ jenkins.dest }}" diff --git a/ansible/roles/jenkins-worker/templates/centos.initd.j2 b/ansible/roles/jenkins-worker/templates/centos5.initd.j2 similarity index 92% rename from ansible/roles/jenkins-worker/templates/centos.initd.j2 rename to ansible/roles/jenkins-worker/templates/centos5.initd.j2 index f18b274d1..041c23f98 100644 --- a/ansible/roles/jenkins-worker/templates/centos.initd.j2 +++ b/ansible/roles/jenkins-worker/templates/centos5.initd.j2 @@ -17,7 +17,7 @@ PIDFILE=/var/run/jenkins/$NAME.pid JENKINS_SLAVE_USER="iojs" JENKINS_SLAVE_JAR="/home/{{ server_user }}/slave.jar" JENKINS_SLAVE_LOG="/home/{{ server_user }}/$NAME.log" -JENKINS_SLAVE_ARGS="-Xmx{{ server_ram|default('128m') }} -jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp -secret {{ secret }}" +JENKINS_SLAVE_ARGS="-jnlpUrl {{ jenkins_url }}/computer/{{ inventory_hostname }}/slave-agent.jnlp -secret {{ secret }}" JENKINS_ENV="JOBS={{ ansible_processor_vcpus }} \ HOME=/home/{{ server_user }} \ DESTCPU={{ ansible_architecture }} \ diff --git a/ansible/roles/jenkins-worker/templates/centos6.initd.j2 b/ansible/roles/jenkins-worker/templates/centos6.initd.j2 new file mode 100644 index 000000000..d5160483d --- /dev/null +++ b/ansible/roles/jenkins-worker/templates/centos6.initd.j2 @@ -0,0 +1,93 @@ +#!/bin/sh +# +# /etc/init.d/jenkins +# init script for a jenkins slave. +# +# chkconfig: 345 90 60 +# description: jenkins slave +# + +RETVAL=0 + +NAME=`basename "$0"` +JENKINS_CONFIG=/etc/sysconfig/$NAME +LOCK_FILE=/var/lock/$NAME +JAVA=/usr/bin/java +PIDFILE=/var/run/jenkins/$NAME.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Read config +[ -f "$JENKINS_CONFIG" ] && . "$JENKINS_CONFIG" + +# Add scl-specific path as well as regular path. +# We add /usr/local/bin since that's where ccache symlinks live +JENKINS_PATH="/usr/local/bin:$JENKINS_PATH:$PATH" + +# Replace potentially double colons since they add cwd +JENKINS_PATH="${JENKINS_PATH//::/:}" + +slave_start() { + echo Starting $NAME... + + mkdir `dirname $PIDFILE` > /dev/null 2>&1 || true + chown $JENKINS_SLAVE_USER `dirname $PIDFILE` + + runuser -m -l $JENKINS_SLAVE_USER -c "$JENKINS_ENV PATH=$JENKINS_PATH $JAVA \ + -jar $JENKINS_SLAVE_JAR $JENKINS_SLAVE_ARGS > $JENKINS_SLAVE_LOG 2>&1 &" + pgrep -f -u $JENKINS_SLAVE_USER $JENKINS_SECRET > $PIDFILE + RETVAL=$? + [ $RETVAL -eq 0 ] && touch $LOCK_FILE +} + +slave_stop() { + echo Stopping $NAME... + pid=`cat $PIDFILE` + + killproc -p $PIDFILE + + # Wait until the monitor exits + while (checkpid $pid) + do + usleep 100000 + done + + RETVAL=$? + [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE +} + +slave_restart() { + echo Restarting $NAME... + slave_stop + slave_start + + RETVAL=$? + [ $RETVAL -eq 0 ] && touch $LOCK_FILE +} + +slave_status() { + status -p $PIDFILE $NAME + RETVAL=$? +} + +case "$1" in + start) + slave_start + ;; + stop) + slave_stop + ;; + restart) + slave_restart + ;; + status) + slave_status + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit $RETVAL diff --git a/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 b/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 new file mode 100644 index 000000000..9fc255d23 --- /dev/null +++ b/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 @@ -0,0 +1,13 @@ +JENKINS_SLAVE_USER="iojs" +JENKINS_SLAVE_JAR="/home/iojs/slave.jar" +JENKINS_SLAVE_LOG="/home/iojs/$NAME.log" +JENKINS_SECRET="{{ secret }}" +JENKINS_SLAVE_ARGS="-jnlpUrl {{ jenkins_url }}/computer/{{ ansible_hostname }}/slave-agent.jnlp -secret $JENKINS_SECRET" +JENKINS_PATH="" +JENKINS_ENV="JOBS={{ ansible_processor_vcpus }} \ + HOME=/home/{{ server_user }} \ + NODE_TEST_DIR=$HOME/tmp \ + DESTCPU={{ arch }} \ + ARCH={{ arch }} \ + OSTYPE=linux-gnu \ + NODE_COMMON_PIPE=/home/iojs/test.pipe" diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml index ef69a0f01..558989bf7 100644 --- a/ansible/roles/jenkins-worker/vars/main.yml +++ b/ansible/roles/jenkins-worker/vars/main.yml @@ -5,7 +5,8 @@ # init: { - centos: ['centos5', 'centos6','centos7'], + centos5: 'centos5', + centos6: 'centos6', debian: ['debian7', 'ubuntu1204'], freebsd: 'freebsd', rhel72: 'rhel72', @@ -16,9 +17,14 @@ init: { } jenkins_init: { - centos: { + centos5: { dest: '/etc/init.d/jenkins', - src: 'centos.initd.j2', + src: 'centos5.initd.j2', + mode: '0755' + }, + centos6: { + dest: '/etc/init.d/jenkins', + src: 'centos6.initd.j2', mode: '0755' }, debian: { From 77c5782bad5d9cdbbd07e623857df4352e2e0fa6 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 10 Apr 2018 17:09:02 +1000 Subject: [PATCH 4/7] ansible: fix release centos6 ip address in inventory --- ansible/inventory.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 6df4e5830..509ec19bf 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -53,7 +53,7 @@ hosts: - softlayer: centos5-x86-1: {ip: 50.23.85.253} - centos6-x64-1: {ip: 50.97.245.10} + centos6-x64-1: {ip: 169.62.77.228} - linuxonecc: rhel72-s390x-1: {ip: 148.100.110.65} From d3973b4f45b9c6e16d9adc1e37ada69a4b64823a Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 10 Apr 2018 17:17:50 +1000 Subject: [PATCH 5/7] ansible: minor centos6 tweaks --- .../tasks/partials/repo/centos6.yml | 2 +- .../bootstrap/tasks/partials/centos6.yml | 21 +++++++++++++++++++ .../tasks/partials/tap2junit/centos6.yml | 2 +- .../templates/centos6.sysconfig.j2 | 6 +++--- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 ansible/roles/bootstrap/tasks/partials/centos6.yml diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml index a24027a24..9c1ea9431 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml @@ -2,7 +2,7 @@ - name: centos6 | install epel yum: - name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm" + name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" state: present - name: centos6 | install ius diff --git a/ansible/roles/bootstrap/tasks/partials/centos6.yml b/ansible/roles/bootstrap/tasks/partials/centos6.yml new file mode 100644 index 000000000..6751c4bb7 --- /dev/null +++ b/ansible/roles/bootstrap/tasks/partials/centos6.yml @@ -0,0 +1,21 @@ +--- + +# +# a centos6 bootstrap - copied from fedora +# + +- name: check for python + raw: stat /usr/bin/python + register: has_python + failed_when: has_python.rc > 1 + +- name: check for libselinux-python bindings + raw: yum info libselinux-python | grep Installed + register: has_libselinux + failed_when: has_libselinux.rc > 1 + +- name: install libselinux-python bindings + raw: yum install -y libselinux-python + +- name: disable selinux + selinux: state=disabled diff --git a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/centos6.yml b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/centos6.yml index fbfc72f2a..734d330f3 100644 --- a/ansible/roles/jenkins-worker/tasks/partials/tap2junit/centos6.yml +++ b/ansible/roles/jenkins-worker/tasks/partials/tap2junit/centos6.yml @@ -13,5 +13,5 @@ - python-argparse - name: install tap2junit - raw: easy_install tap2junit + raw: easy_install --index-url https://pypi.python.org/pypi tap2junit diff --git a/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 b/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 index 9fc255d23..85cfa1aee 100644 --- a/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 +++ b/ansible/roles/jenkins-worker/templates/centos6.sysconfig.j2 @@ -4,10 +4,10 @@ JENKINS_SLAVE_LOG="/home/iojs/$NAME.log" JENKINS_SECRET="{{ secret }}" JENKINS_SLAVE_ARGS="-jnlpUrl {{ jenkins_url }}/computer/{{ ansible_hostname }}/slave-agent.jnlp -secret $JENKINS_SECRET" JENKINS_PATH="" -JENKINS_ENV="JOBS={{ ansible_processor_vcpus }} \ +JENKINS_ENV="JOBS={{ jobs_env }} \ HOME=/home/{{ server_user }} \ NODE_TEST_DIR=$HOME/tmp \ - DESTCPU={{ arch }} \ - ARCH={{ arch }} \ + DESTCPU={{ server_arch | default(arch) }} \ + ARCH={{ server_arch | default(arch) }} \ OSTYPE=linux-gnu \ NODE_COMMON_PIPE=/home/iojs/test.pipe" From 0f8bcf62de441993cf051e558bc06fb9384b979d Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 11 Apr 2018 13:40:08 +1000 Subject: [PATCH 6/7] ansible: devtoolset-6 and newer git for centos7 --- .../baselayout/files/centos-aarch-sclo.repo | 5 ++++ ansible/roles/baselayout/tasks/main.yml | 7 ++++++ .../tasks/partials/repo/centos6.yml | 2 +- .../tasks/partials/repo/centos7.yml | 24 +++++++++++++++++-- ansible/roles/baselayout/vars/main.yml | 7 ++++-- 5 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 ansible/roles/baselayout/files/centos-aarch-sclo.repo diff --git a/ansible/roles/baselayout/files/centos-aarch-sclo.repo b/ansible/roles/baselayout/files/centos-aarch-sclo.repo new file mode 100644 index 000000000..2acb67765 --- /dev/null +++ b/ansible/roles/baselayout/files/centos-aarch-sclo.repo @@ -0,0 +1,5 @@ +[sclo-aarch64] +name=CentOS-$releasever - AArch64 SCLo +baseurl=http://mirror.centos.org/altarch/$releasever/sclo/aarch64/rh/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo diff --git a/ansible/roles/baselayout/tasks/main.yml b/ansible/roles/baselayout/tasks/main.yml index 0498a78b6..b3865b040 100644 --- a/ansible/roles/baselayout/tasks/main.yml +++ b/ansible/roles/baselayout/tasks/main.yml @@ -53,6 +53,12 @@ stat: path="{{ binary_dest }}" register: has_git +- name: centos | remove existing git package + when: "(os == 'centos6' or os == 'centos7') and arch != 'arm64'" + yum: + name: "git" + state: absent + - name: install packages when: not os|startswith("zos") package: name="{{ package }}" state=present @@ -60,6 +66,7 @@ loop_var: package with_items: # ansible doesn't like empty lists + - "{{ packages[os+'_'+arch]|default('[]') }}" - "{{ packages[os]|default('[]') }}" - "{{ packages[os|stripversion]|default('[]') }}" - "{{ common_packages|default('[]') }}" diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml index 9c1ea9431..da4be6460 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml @@ -7,7 +7,7 @@ - name: centos6 | install ius yum: - name: "https://centos6.iuscommunity.org/ius-release.rpm" + name: "https://centos{{ ansible_distribution_major_version }}.iuscommunity.org/ius-release.rpm" state: present - name: centos6 | install devtoolset-2 repo diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos7.yml b/ansible/roles/baselayout/tasks/partials/repo/centos7.yml index 08bfde35b..530477315 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos7.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos7.yml @@ -1,6 +1,26 @@ --- -- name: install epel +- name: centos7 | install epel yum: - name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" + name: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm" state: present + +- name: centos7 | install ius + when: "arch != 'arm64'" + yum: + name: "https://centos{{ ansible_distribution_major_version }}.iuscommunity.org/ius-release.rpm" + state: present + +- name: centos7 | aarch64 | install sclo repo + when: "arch == 'arm64'" + copy: + src: "{{ role_path }}/files/centos-aarch-sclo.repo" + dest: "/etc/yum.repos.d/centos-aarch-sclo.repo" + mode: 0644 + +- name: centos7 | aarch64 | install sclo repo key + when: "arch == 'arm64'" + get_url: + url: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo" + dest: "/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo" + mode: 0644 diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index f71313750..32d0b94b7 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -35,11 +35,14 @@ common_packages: [ packages: { centos6: [ 'centos-release-scl', - 'ccache,git2u,gcc-c++,centos-release-scl,devtoolset-6', # even need gcc on centos6 so ccache has symlinks + 'ccache,git2u,gcc-c++,devtoolset-6', # even need gcc on centos6 so ccache has symlinks ], + centos7_arm64: ['git'], # git2u not available for aarch64 (yet) + centos7_x64: ['git2u','centos-release-scl'], # centos-release-scl is required to enable SCLo + # but we do it manually in partials/repo/centos7.yml for arm64 centos7: [ - 'ccache,git,gcc-c++', + 'ccache,gcc-c++,devtoolset-6', ], debian7: [ From a93189c0736677f7e2e0467a628fec1d84a1e2de Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 11 Apr 2018 15:55:05 +1000 Subject: [PATCH 7/7] ansible: support centos6 x86 with devtoolset-6 --- ansible/roles/baselayout/tasks/partials/repo/centos6.yml | 7 +++++++ ansible/roles/baselayout/vars/main.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml index da4be6460..42d0109dd 100644 --- a/ansible/roles/baselayout/tasks/partials/repo/centos6.yml +++ b/ansible/roles/baselayout/tasks/partials/repo/centos6.yml @@ -15,3 +15,10 @@ url: http://people.centos.org/tru/devtools-2/devtools-2.repo dest: /etc/yum.repos.d/devtools-2.repo mode: 0644 + +- name: centos6 | install devtoolset-6 for i686 + when: "arch == 'x86'" + get_url: + url: "https://copr.fedorainfracloud.org/coprs/mlampe/devtoolset-6.1/repo/epel-6/mlampe-devtoolset-6.1-epel-6.repo" + dest: "/etc/yum.repos.d/mlampe-devtoolset-6.1-epel-6.repo" + mode: 0644 diff --git a/ansible/roles/baselayout/vars/main.yml b/ansible/roles/baselayout/vars/main.yml index 32d0b94b7..5d07d0d3e 100644 --- a/ansible/roles/baselayout/vars/main.yml +++ b/ansible/roles/baselayout/vars/main.yml @@ -33,8 +33,8 @@ common_packages: [ # you can either add os family or os to this list (see smartos) # but the playbook chooses os over family - not both packages: { + centos6_x64: ['centos-release-scl'], # only available on x86_64, 32-bit is from https://copr.fedorainfracloud.org/coprs/mlampe centos6: [ - 'centos-release-scl', 'ccache,git2u,gcc-c++,devtoolset-6', # even need gcc on centos6 so ccache has symlinks ],