Skip to content
Snippets Groups Projects
Commit 7355c1cd authored by František Dvořák's avatar František Dvořák
Browse files

Ansible linting

parent 0870a0a3
No related branches found
No related tags found
No related merge requests found
...@@ -47,4 +47,5 @@ ...@@ -47,4 +47,5 @@
environment: environment:
KUBECONFIG: /etc/kubernetes/admin.conf KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
changed_when: true
when: true when: true
...@@ -47,7 +47,11 @@ ...@@ -47,7 +47,11 @@
dest: /etc/cron-apt/action.d/9-upgrade dest: /etc/cron-apt/action.d/9-upgrade
content: -q -q dist-upgrade content: -q -q dist-upgrade
mode: 0644 mode: 0644
- name: Mails settings rescue:
- name: Site install cron-apt fail
fail:
mag: "Site install cron-apt failed"
- name: Mail Settings
vars: vars:
fip_hostname: "{{ lookup('dig', (groups['fip'][0], 'PTR') | join('/')) | regex_replace('\\.$', '') }}" fip_hostname: "{{ lookup('dig', (groups['fip'][0], 'PTR') | join('/')) | regex_replace('\\.$', '') }}"
block: block:
...@@ -575,8 +579,7 @@ ...@@ -575,8 +579,7 @@
name: ubuntu-drivers-common name: ubuntu-drivers-common
update_cache: true update_cache: true
- name: Install Nvidia driver packages - name: Install Nvidia driver packages
shell: |- command: ubuntu-drivers install
ubuntu-drivers install
changed_when: true changed_when: true
- name: Reboot GPU node - name: Reboot GPU node
reboot: reboot:
...@@ -615,6 +618,7 @@ ...@@ -615,6 +618,7 @@
when: true when: true
- name: Get GPU node hostnames - name: Get GPU node hostnames
shell: |- shell: |-
set -o pipefail
kubectl get nodes --no-headers -o custom-columns=NAME:.metadata.name | grep -- -gpu- kubectl get nodes --no-headers -o custom-columns=NAME:.metadata.name | grep -- -gpu-
register: gpu_nodes register: gpu_nodes
changed_when: false changed_when: false
...@@ -626,8 +630,12 @@ ...@@ -626,8 +630,12 @@
- name: Add required label to GPU nodes to create mig profiles - name: Add required label to GPU nodes to create mig profiles
vars: vars:
mig_profile: all-1g.12gb mig_profile: all-1g.12gb
shell: |- command: |-
kubectl label node {{ item }} nvidia.com/mig.config={{ mig_profile }} --overwrite kubectl label node {{ item }} nvidia.com/mig.config={{ mig_profile }} --overwrite
loop: "{{ gpu_nodes.stdout_lines }}" loop: "{{ gpu_nodes.stdout_lines }}"
changed_when: true changed_when: true
when: true when: true
rescue:
- name: GPU Setup Fail
fail:
msg: "GPU setup failed"
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list or when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list or
'eginotebooks' not in ansible_local.helm_repos | map(attribute='name') | list" 'eginotebooks' not in ansible_local.helm_repos | map(attribute='name') | list"
- name: Get latest helm charts - name: Get latest helm charts
shell: |- command: |-
helm repo update helm repo update
changed_when: true changed_when: true
- name: Get Secrets from Vault for notebooks - name: Get Secrets from Vault for notebooks
......
...@@ -212,6 +212,7 @@ ...@@ -212,6 +212,7 @@
environment: environment:
KUBECONFIG: /etc/kubernetes/admin.conf KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
changed_when: true
when: true when: true
- name: Workaround for binder socket and bind-mount race-condition - name: Workaround for binder socket and bind-mount race-condition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment