From f54287d633b690f16c60871d01407764c32f2893 Mon Sep 17 00:00:00 2001
From: handreas <andreas.hamacher@monash.edu>
Date: Sun, 26 Apr 2020 08:40:05 +0000
Subject: [PATCH] less changed and package deprecation fix

Former-commit-id: 409a69018e26bf118e45458c33b0e30d0f7615f1
---
 CICD/plays/computenodes.yml   |  2 +-
 CICD/plays/mgmtnodes.yml      |  2 +-
 roles/etcHosts/tasks/main.yml |  2 --
 roles/lmod/tasks/main.yml     | 23 +++++++++++++----------
 4 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/CICD/plays/computenodes.yml b/CICD/plays/computenodes.yml
index 2a5452b1..985add02 100644
--- a/CICD/plays/computenodes.yml
+++ b/CICD/plays/computenodes.yml
@@ -32,7 +32,7 @@
   - { role: move_homedir, tags: [ authentication, filesystems ] }
   - { role: nfs-client, nfsMounts: "{{ computeNfsMounts }}", tags: [ filesystems ] }
   - { role: slurm-common, tags: [ slurm, slurm-common ] }
-  - { role: lmod, tags: [ other ] }
+  #- { role: lmod, tags: [ other ] } # actually preffered on ubuntu but mutually exclusive with environment-modules
   - { role: enable_modules, default_modules: "modulecmd", tags: [ other ] }
   - { role: postfix, tags: [ mail, other ] }
   - { role: set_semaphore_count, tags: [ semaphore ] }
diff --git a/CICD/plays/mgmtnodes.yml b/CICD/plays/mgmtnodes.yml
index a76d569f..50442355 100644
--- a/CICD/plays/mgmtnodes.yml
+++ b/CICD/plays/mgmtnodes.yml
@@ -35,7 +35,7 @@
   - { role: slurm-common, tags: [ slurm, slurm-common ]  }
   - { role: slurm_config, tags: [ slurm, slurm-config ] }
   - { role: slurm-start, start_slurmdbd: True, start_slurmctld: True, tags: [ slurm-start ]  }
-  - { role: telegraf, tags: [ monitoring,SiteSpecific ] }
+  - { role: telegraf, tags: [ monitoring, SiteSpecific ] }
 #  - { role: provision_slurm, use_active_directory: False, lockpath: "/mnt/home", tags: [ slurm ]  }
 #  - { role: provision_homedir, use_active_directory: False, mntpt: "/mnt/home", tags: [ provisioning ] }
 
diff --git a/roles/etcHosts/tasks/main.yml b/roles/etcHosts/tasks/main.yml
index 677f6e57..180a8717 100644
--- a/roles/etcHosts/tasks/main.yml
+++ b/roles/etcHosts/tasks/main.yml
@@ -7,8 +7,6 @@
   register: sysctl_hostname
   check_mode: no
   changed_when: False
-  become: true
-  become_user: root
 
 - name: set hostname by sysctl
   shell: sysctl kernel.hostname="{{ inventory_hostname }}"
diff --git a/roles/lmod/tasks/main.yml b/roles/lmod/tasks/main.yml
index 8af1a69a..1b348eda 100644
--- a/roles/lmod/tasks/main.yml
+++ b/roles/lmod/tasks/main.yml
@@ -2,15 +2,16 @@
 - include_vars: "{{ ansible_os_family }}.yml"
 
 - name: install lua centos
-  yum: name={{ item }} state=present update_cache=yes
-  with_items:
-    - lua
-    - lua-filesystem
-    - lua-posix
-    - tcl
-    - rsync
-    - gcc
-    - lua-devel
+  package:
+    state: present
+    name:
+      - lua
+      - lua-filesystem
+      - lua-posix
+      - tcl
+      - rsync
+      - gcc
+      - lua-devel
   become: true
   when: ansible_os_family == 'RedHat'
 
@@ -30,7 +31,9 @@
   become: true
 
 - name: install lua debian
-  apt: name=lmod state=present
+  package: 
+    name: lmod 
+    state: present
   become: true
   when: ansible_os_family == 'Debian'
 
-- 
GitLab