Skip to content

Commit a0f4068

Browse files
Merge pull request #134 from oci-hpc/2.10.3_an_ol8_fixes
2.10.3 an ol8 fixes
2 parents c784965 + 6bc1a97 commit a0f4068

File tree

11 files changed

+51
-24
lines changed

11 files changed

+51
-24
lines changed

autoscaling/tf_init/inventory.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bastion]
2-
${bastion_name} ansible_host=${bastion_ip} ansible_user=${bastion_username} role=bastion
2+
${bastion_name} ansible_host=${bastion_ip} ansible_user=${bastion_username} role=bastion ansible_python_interpreter=/usr/bin/python
33
[slurm_backup]
44
%{ if backup_name != "" }${backup_name} ansible_host=${backup_ip} ansible_user=${bastion_username} role=bastion%{ endif }
55
[login]

bin/bastion.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,21 @@ if [ $ID == "ol" ] || [ $ID == "centos" ] ; then
3838
sudo yum install --enablerepo=$repo -y ansible python-netaddr
3939
elif [ $vid == 8 ] ; then
4040
sudo yum makecache --enablerepo=$repo
41-
sudo yum install --enablerepo=$repo -y ansible python3-netaddr
41+
sudo yum install --enablerepo=$repo -y python38.x86_64
42+
sudo python3.8 -m pip install ansible cryptography netaddr
43+
sudo mkdir /etc/ansible
44+
sudo ln -s /usr/local/bin/ansible-playbook /bin/ansible-playbook
45+
sudo ln -s /usr/local/bin/ansible /bin/ansible
46+
sudo python3 -m pip install -U pip
47+
sudo python3 -m pip install netaddr --upgrade
48+
sudo python3 -m pip install setuptools_rust --upgrade
49+
sudo python3 -m pip install requests --upgrade
50+
sudo python3 -m pip install urllib3 --upgrade
4251
fi
4352
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
4453
sudo yum install -y terraform
54+
sudo python3 -m pip install oci-cli --upgrade
4555

46-
sudo pip3 install oci-cli --upgrade
4756

4857
elif [ $ID == "debian" ] || [ $ID == "ubuntu" ] ; then
4958
# checking here as well to be sure that the lock file is not being held
@@ -66,16 +75,13 @@ elif [ $ID == "debian" ] || [ $ID == "ubuntu" ] ; then
6675
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
6776
fi
6877

69-
7078
sudo sed -i 's/"1"/"0"/g' /etc/apt/apt.conf.d/20auto-upgrades
7179
sudo apt purge -y --auto-remove unattended-upgrades
7280
sudo systemctl disable apt-daily-upgrade.timer
7381
sudo systemctl mask apt-daily-upgrade.service
7482
sudo systemctl disable apt-daily.timer
7583
sudo systemctl mask apt-daily.service
7684

77-
78-
7985
sleep 10s
8086

8187
sudo apt-mark hold linux-oracle linux-headers-oracle linux-image-oracle
@@ -141,7 +147,8 @@ fi
141147

142148
ansible-galaxy collection install ansible.netcommon:=2.5.1 --force > /dev/null
143149
ansible-galaxy collection install community.general:=4.8.1 --force > /dev/null
144-
ansible-galaxy collection install ansible.posix > /dev/null
150+
ansible-galaxy collection install ansible.posix --force > /dev/null
151+
ansible-galaxy collection install community.crypto --force > /dev/null
145152

146153
threads=$(nproc)
147154
forks=$(($threads * 8))

inventory.tpl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bastion]
2-
${bastion_name} ansible_host=${bastion_ip} ansible_user=${bastion_username} role=bastion
2+
${bastion_name} ansible_host=${bastion_ip} ansible_user=${bastion_username} role=bastion ansible_python_interpreter=/usr/bin/python
33
[slurm_backup]
44
%{ if backup_name != "" }${backup_name} ansible_host=${backup_ip} ansible_user=${compute_username} role=bastion%{ endif }
55
[login]
@@ -73,5 +73,4 @@ tenancy_ocid = ${tenancy_ocid}
7373
inst_prin = ${inst_prin}
7474
api_fingerprint = ${api_fingerprint}
7575
api_user_ocid = ${api_user_ocid}
76-
sacct_limits=${sacct_limits}
77-
76+
sacct_limits=${sacct_limits}

playbooks/group_vars/all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ssl_cert_path: '/etc/ssl/certs'
22
ssl_ca_cert: '{{ ssl_cert_path }}/cluster-ca.crt'
3-
ssl_cert_group: ssl
3+
ssl_cert_group: ssl

playbooks/roles/grafana/tasks/el.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- name: install grafana
1616
vars:
1717
package_name:
18-
- https://dl.grafana.com/oss/release/grafana-8.5.21-1.x86_64.rpm
18+
- grafana
1919
package_state: present
2020
include_role:
2121
name: safe_yum

playbooks/roles/openldap/tasks/el.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
# tasks file for openldap
3-
43
- name: Create /etc/opt/oci-hpc/passwords/openldap
54
become: true
65
file:

playbooks/roles/packages/tasks/ol-7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- pdsh
1313
- python3-pip
1414
package_state: latest
15-
package_repo: "epel,ol7_developer_EPEL"
15+
package_repo: "ol7_developer_EPEL"
1616
include_role:
1717
name: safe_yum
1818

playbooks/roles/ssh/tasks/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
- cluster.key
1919

2020
- name: Generate an OpenSSL public key in OpenSSH v2 format
21-
openssl_publickey:
21+
community.crypto.openssl_publickey:
2222
path: "/home/{{ ansible_user }}/.ssh/id_rsa.pub"
2323
privatekey_path: "/home/{{ ansible_user }}/.ssh/id_rsa"
2424
format: OpenSSH

playbooks/roles/sssd/tasks/debian.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
group: 'root'
1717
mode: '0600'
1818
notify: restart sssd
19+
when: not pam | bool
20+
21+
- name: Add configuration file to /etc/sssd/sssd.conf
22+
template:
23+
src: 'sssd_ubuntu.conf.j2'
24+
dest: '/etc/sssd/sssd.conf'
25+
owner: 'root'
26+
group: 'root'
27+
mode: '0600'
28+
notify: restart sssd
29+
when: pam | bool
1930

2031
- name: Copy CA certificate
2132
copy:

playbooks/roles/sssd/templates/sssd.conf.j2

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,25 @@ services = nss, pam
55
domains = cluster
66

77
[nss]
8-
98
filter_users = root
109
entry_negative_timeout = 5
1110

1211
[pam]
13-
1412
pam_verbosity = 2
1513
pam_account_expired_message = 'Your account has expired. Please contact a system administrator'
1614

1715
[domain/cluster]
18-
1916
ldap_schema = rfc2307bis
20-
2117
id_provider = ldap
2218
auth_provider = ldap
2319
access_provider = ldap
2420
chpass_provider = ldap
25-
2621
cache_credentials = true
2722
entry_cache_timeout = 600
28-
2923
ldap_uri = ldaps://{{ hostvars[groups['bastion'][0]]['ansible_fqdn'] }}
30-
3124
ldap_search_base = dc=local
3225
ldap_network_timeout = 30
33-
3426
ldap_access_order = expire
3527
ldap_access_filter = (&(objectclass=inetOrgPerson))
3628
ldap_account_expire_policy = shadow
37-
enumerate = true
29+
enumerate = true

0 commit comments

Comments
 (0)