diff --git a/CICD/vars/vars.yml b/CICD/vars/vars.yml index d1dc95cfbdf366fc202881732465d8f55bbda36b..4af25b687f25bfa7b046bc6efb03219ede0badba 100644 --- a/CICD/vars/vars.yml +++ b/CICD/vars/vars.yml @@ -2,6 +2,8 @@ sudo_group: systems nagios_home: "/var/lib/nagios" nvidia_version: "390.46" +reposervername: consistency0 +reposerverip: 118.138.244.7 gpumap: 'K1': 'K1' diff --git a/roles/calculateEtcHosts/tasks/main.yml b/roles/calculateEtcHosts/tasks/main.yml index ff71a956bb33175ab3ebe2227ed0b13a55165746..1d1c617050cd33d1fbf3ffe17b3b5696ebc2c254 100644 --- a/roles/calculateEtcHosts/tasks/main.yml +++ b/roles/calculateEtcHosts/tasks/main.yml @@ -8,7 +8,7 @@ - name: make hosts data command: /tmp/makehosts.py /tmp/groups {{ domain }} register: hosts_data - + - name: write hosts file template: dest=/tmp/etcHosts src=etcHosts.j2 diff --git a/roles/calculateEtcHosts/templates/etcHosts.j2 b/roles/calculateEtcHosts/templates/etcHosts.j2 index 590826feef324307abcff9aa6f8fcbaccfee30e0..df9a12d0bc8878ac0439f5e83c623dbab9c32f74 100644 --- a/roles/calculateEtcHosts/templates/etcHosts.j2 +++ b/roles/calculateEtcHosts/templates/etcHosts.j2 @@ -5,7 +5,7 @@ ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 118.138.241.196 hpcldap0.erc.monash.edu.au -118.138.244.7 consistency0 +{{ reposerverip }} {{ reposervername }} {% for item in hosts_data.stdout_lines %} {{ item }} diff --git a/roles/config_repos/tasks/main.yml b/roles/config_repos/tasks/main.yml index 02bc89770d1639870f12678aa05b218318dcb01a..cfb9fec75801e60a8b77dff21083359f87fb7c4b 100644 --- a/roles/config_repos/tasks/main.yml +++ b/roles/config_repos/tasks/main.yml @@ -1,9 +1,9 @@ --- - name: make sure out repo server is resolvable - lineinfile: - dest: /etc/hosts - line: "118.138.244.7 consistency0" + lineinfile: + dest: /etc/hosts + line: "{{ reposerverip }} {{ reposervername }}" #this is duplicated in the role calculateEtcHosts owner: root group: root @@ -51,7 +51,7 @@ - name: disable unwanted repos shell: yum-config-manager --disable "{{ item }}" - with_items: "{{repolist.stdout_lines|difference(yumenablerepo)}}" + with_items: "{{ repolist.stdout_lines|difference(yumenablerepo) }}" become: true become_user: root ignore_errors: true