Skip to content
Snippets Groups Projects
Commit 5608a6dc authored by Trung Nguyen's avatar Trung Nguyen
Browse files

Merge branch 'maintNov18' into 'master'

Maint nov18

See merge request !408
parents 34ab73c4 609152a6
No related branches found
No related tags found
1 merge request!408Maint nov18
......@@ -66,7 +66,7 @@
tasks:
- name: set nologin
block:
- { name: populate nologin file, shell: 'echo "MASSIVE is currently undergoing maintenance. Please log in after 12PM tonight" > /etc/nologin', become: true, become_user: root }
- { name: populate nologin file, shell: 'echo "MonARCH is down for a scheduled maintenance." > /etc/nologin', become: true, become_user: root }
- { name: set attribute immutable so will not be deleted, shell: 'chattr +i /etc/nologin', become: true, become_user: root }
become: true
tags: [never,setnologin]
......@@ -97,19 +97,6 @@
become: true
tags: [never,startenablelustre16Aug]
- hosts: 'ComputeNodes,LoginNodes,DGXRHELNodes'
gather_facts: false
tasks:
- { name: kill squashfs, shell: "sudo pkill -f squashfuse", become: true, become_user: root, tags: [never,umount_home] }
- { name: umount /home, mount: path=/home src=130.194.249.9:/data1/m3-home state=unmounted, become: true, become_user: root, tags: [never,umount_home] }
- { name: umount /home, mount: path=/home src=130.194.249.9:/data1/m3-home state=absent, become: true, become_user: root, tags: [never,umount_home] }
- hosts: 'ManagementNodes'
gather_facts: false
tasks:
- { name: umount /home, mount: path=/mnt/home src=130.194.249.9:/data1/m3-home state=unmounted, become: true, become_user: root, tags: [never,umount_home] }
- { name: umount /home, mount: path=/mnt/home src=130.194.249.9:/data1/m3-home state=absent, become: true, become_user: root, tags: [never,umount_home] }
#- hosts: 'ComputeNodes,LoginNodes,DGXRHELNodes'
# gather_facts: false
# tasks:
......
- name: set preserve hostname on CentOS
- name: see if cloud.cfg exists
stat:
path: /etc/cloud/cloud.cfg
register: cloudcfg
- name: set preserve hostname on CentOSVM
lineinfile:
args:
dest: /etc/cloud/cloud.cfg
line: "preserve_hostname: true"
state: present
become: true
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7" and cloudcfg.stat.islnk is defined
- name: remove preserve_hostname_false on CentOS
lineinfile:
......
......@@ -63,11 +63,25 @@
yum:
name:
- git
- ansible
- centos-release-ansible-29.noarch
- centos-release-configmanagement
update_cache: yes
state: latest
enablerepo:
- extras
become: true
become_user: root
when:
- '"CentOS" in ansible_distribution'
- name: "Install admin packages packages centos"
yum:
name:
- ansible
update_cache: yes
state: latest
enablerepo: extras
enablerepo:
- centos-ansible-29
become: true
become_user: root
when:
......
---
#https://docs.gluster.org/en/latest/Administrator%20Guide/Storage%20Pools/
- name: install gluster
yum: name={{ item }} state='latest'
yum:
name:
- glusterfs-3.12.7-1.el7
- glusterfs-server-3.12.7-1.el7
state: present
#disablerepo: base
when: ansible_os_family == 'RedHat'
with_items:
- glusterfs
- glusterfs-server
become: true
become_user: root
- name: install gluster
apt: name=glusterfs-server state='latest'
apt: name=glusterfs-server state=present
when: ansible_os_family == 'Debian'
become: true
become_user: root
......
......@@ -47,11 +47,17 @@
- name: "Adding user database"
mysql_db: name={{ mysql_user_db_name }} state=present login_user=root login_password={{ mysql_root_password }}
- name: "Giving priviliges to user"
mysql_user: name={{ mysql_user_name }} host={{ mysql_user_host }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
when: mysql_user_host is defined
- name: "Giving priviliges to user"
- name: "Giving priviliges to user with fqdn"
mysql_user: name={{ mysql_user_name }} host={{ hostvars[item].ansible_fqdn }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
- name: "Giving priviliges to user with shortname"
mysql_user: name={{ mysql_user_name }} host={{ inventory_hostname }} password={{ mysql_user_password }} login_user=root login_password={{ mysql_root_password }} priv={{ mysql_user_db_name }}.*:ALL,GRANT state=present
with_items: "{{ mysql_user_hosts_group }}"
when: mysql_user_hosts_group is defined
......@@ -68,22 +68,22 @@
name: '*'
state: latest
update_cache: yes
exclude: kernel*,mlnx-ofa_kernel*,kmod-lustre-client*,kmod-mlnx-ofa_kernel*,kmod-lustre-client*,lustre-client*,gluster*,centos-release*
disablerepo: "{{ yumdisablerepo|join(',') }}"
enablerepo: "{{ yumenablerepo|join(',') }}"
exclude: kernel*,mlnx-ofa_kernel*,kmod-lustre-client*,kmod-mlnx-ofa_kernel*,kmod-lustre-client*,lustre-client*,centos-release*, glusterfs*
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is defined
when:
- when: inventory_hostname in groups.ManagementNodes or inventory_hostname in groups.SQLNodes
- name: yum upgrade
yum:
name: '*'
state: latest
update_cache: yes
exclude: kernel*,mlnx-ofa_kernel*,kmod-lustre-client*,kmod-mlnx-ofa_kernel*,kmod-lustre-client*,lustre-client*,gluster*,centos-release*
exclude: kernel*,mlnx-ofa_kernel*,kmod-lustre-client*,kmod-mlnx-ofa_kernel*,kmod-lustre-client*,lustre-client*,centos-release*
become: true
become_user: root
when: ansible_os_family=="RedHat" and yumdisablerepo is undefined
when:
- when: inventory_hostname not in groups.ManagementNodes and inventory_hostname not in groups.SQLNodes
- name: Clear yum pending transaction
command: yum-complete-transaction --cleanup-only
......
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