Skip to content

Commit

Permalink
Merge pull request #17 from centerforaisafety/cais_ansible_playbooks
Browse files Browse the repository at this point in the history
Install LLVM, gflags, glog, tmux, and zsh.
  • Loading branch information
xksteven authored Mar 13, 2023
2 parents d101cea + 769f3da commit f1317d8
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 0 deletions.
3 changes: 3 additions & 0 deletions playbooks/cais_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- hosts: all
roles:
- cais-all
3 changes: 3 additions & 0 deletions playbooks/cais_bastion_login.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- hosts: bastion,login
roles:
- cais-bastion-login
3 changes: 3 additions & 0 deletions playbooks/cais_compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- hosts: compute
roles:
- cais-compute
11 changes: 11 additions & 0 deletions playbooks/roles/cais-all/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- include: ol-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '7'

- include: centos-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'

- include: ubuntu.yml
when: ansible_distribution == 'Ubuntu'

- include: debian.yml
when: ansible_distribution == 'Debian'
10 changes: 10 additions & 0 deletions playbooks/roles/cais-all/tasks/ol-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Install zsh
vars:
package_name:
- zsh
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
11 changes: 11 additions & 0 deletions playbooks/roles/cais-bastion-login/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- include: ol-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '7'

- include: centos-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'

- include: ubuntu.yml
when: ansible_distribution == 'Ubuntu'

- include: debian.yml
when: ansible_distribution == 'Debian'
10 changes: 10 additions & 0 deletions playbooks/roles/cais-bastion-login/tasks/ol-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Install tmux
vars:
package_name:
- tmux
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
11 changes: 11 additions & 0 deletions playbooks/roles/cais-compute/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- include: ol-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '7'

- include: centos-7.yml
when: ansible_os_family == 'RedHat' and ansible_distribution == 'CentOS' and ansible_distribution_major_version == '7'

- include: ubuntu.yml
when: ansible_distribution == 'Ubuntu'

- include: debian.yml
when: ansible_distribution == 'Debian'
82 changes: 82 additions & 0 deletions playbooks/roles/cais-compute/tasks/ol-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
- name: Install SCL for GCC v5
vars:
package_name:
- devtoolset-5-gcc.x86_64
- devtoolset-5-gcc-c++.x86_64
- devtoolset-5-gcc-gdb-plugin.x86_64
- devtoolset-5-gcc-gfortran.x86_64
- devtoolset-5-gcc-plugin-devel.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install SCL for GCC v6
vars:
package_name:
- devtoolset-6-gcc.x86_64
- devtoolset-6-gcc-c++.x86_64
- devtoolset-6-gcc-gdb-plugin.x86_64
- devtoolset-6-gcc-gfortran.x86_64
- devtoolset-6-gcc-plugin-devel.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install SCL for GCC v8
vars:
package_name:
- devtoolset-8-gcc.x86_64
- devtoolset-8-gcc-c++.x86_64
- devtoolset-8-gcc-gdb-plugin.x86_64
- devtoolset-8-gcc-gfortran.x86_64
- devtoolset-8-gcc-plugin-devel.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install SCL for GCC v10
vars:
package_name:
- devtoolset-10-gcc.x86_64
- devtoolset-10-gcc-c++.x86_64
- devtoolset-10-gcc-gdb-plugin.x86_64
- devtoolset-10-gcc-gfortran.x86_64
- devtoolset-10-gcc-plugin-devel.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install llvm
vars:
package_name:
- llvm-toolset-7.0
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install gflags
vars:
package_name:
- gflags-devel.x86_64
- gflags.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true
- name: Install glog
vars:
package_name:
- glog.x86_64
- glog-devel.x86_64
package_state: latest
package_repo: "epel,ol7_developer_EPEL"
include_role:
name: safe_yum
ignore_errors: true

0 comments on commit f1317d8

Please sign in to comment.