Commit 2a5f3def authored by julian.gethmann's avatar julian.gethmann Committed by yuancun.nie

Set epics ca list environment variable dynamically

* Set the environment varible for EPICS IOCs depending on the environment
  (meant for KARA, LASMagLab or TGU)
  * Use groups and vars in host file to manage these different cases
* Fix problems with the DHCPd role
  * host lists were at wrong location (may be this can be improved)
  * one should check explicitly for variable names (linter warning)
parent fe8dcb09
......@@ -152,40 +152,52 @@ obelix.las.kit.edu
[lab]
# las93.las.kit.edu
faulus.las.kit.edu ansible_python_interpreter=/usr/bin/python3
gutemine.las.kit.edu ansible_python_interpreter=/usr/bin/python3
titania.las.kit.edu ansible_python_interpreter=/usr/bin/python3
ueberdrus.las.kit.edu ansible_python_interpreter=/usr/bin/python3
faulus.las.kit.edu
gutemine.las.kit.edu
titania.las.kit.edu
ueberdrus.las.kit.edu
[lab:vars]
ansible_python_interpreter=/usr/bin/python3
[rpmbuild]
asterix.las.kit.edu
lysander.las.kit.edu
[elegant]
asterix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
falbala.las.kit.edu ansible_python_interpreter=/usr/bin/python3
galantine.las.kit.edu ansible_python_interpreter=/usr/bin/python3
homoeopatix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
idefix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
lysander.las.kit.edu ansible_python_interpreter=/usr/bin/python3
majestix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
methusalix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
obelix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
pepe.las.kit.edu ansible_python_interpreter=/usr/bin/python3
spuernix.las.kit.edu ansible_python_interpreter=/usr/bin/python3
[epics]
asterix.las.kit.edu
faulus.las.kit.edu
falbala.las.kit.edu
galantine.las.kit.edu
gutemine.las.kit.edu
homoeopatix.las.kit.edu
idefix.las.kit.edu
lysander.las.kit.edu
majestix.las.kit.edu
methusalix.las.kit.edu
obelix.las.kit.edu
pepe.las.kit.edu
titania.las.kit.edu
ueberdrus.las.kit.edu
spuernix.las.kit.edu
[elegant:vars]
ansible_python_interpreter=/usr/bin/python3
[epics_kara]
asterix.las.kit.edu
galantine.las.kit.edu
lysander.las.kit.edu
[epics_kara:vars]
epics_ca_addr_list=141.52.111.66
[epics_labs]
homoeopatix.las.kit.edu
idefix.las.kit.edu
majestix.las.kit.edu
pepe.las.kit.edu
[epics:children]
epics_labs
epics_kara
lab
[ripgrep]
asterix.las.kit.edu
......@@ -204,7 +216,7 @@ teefax.las.kit.edu
lysander.las.kit.edu
# semi stable
[tgu]
[tgulab]
pepe.las.kit.edu
faulus.las.kit.edu
gutemine.las.kit.edu
......
......@@ -9,6 +9,8 @@
routers: 192.168.0.10
broadcast: 192.168.0.255
host_list: host-list-maglab
- epics_ca_addr_list: 192.168.0.3
roles:
- dhcpd
- epics
- lab
......@@ -25,7 +25,7 @@ authoritative;
# have to hack syslog.conf to complete the redirection).
log-facility local7;
{% if failover %}
{% if failover is defined %}
# failover https://www.madboa.com/geek/dhcp-failover/
# https://kb.isc.org/article/AA-00502/0/A-Basic-Guide-to-Configuring-DHCP-Failover.html
failover peer "dhcp-failover" {
......@@ -65,7 +65,7 @@ subnet {{ dhcpd.subnet }} netmask {{ dhcpd.netmask }} {
max-lease-time 7200;
deny unknown-clients;
range {{ dhcpd.range_start }} {{ dhcpd.range_end }};
{% if failover %}
{% if failover is defined %}
pool {
failover peer "dhcp-failover";
}
......
# export EPICS base path and configuration to interact with KARA's IOCs
export LD_LIBRARY_PATH=/usr/local/share/base-{{epics_version}}/lib/linux-x86_64:$LD_LIBRARY_PATH
# export EPICS_CA_ADDR_LIST=$(dig +short ankasr-cagw.anka.kit.edu)
export PATH=/usr/local/share/base-{{epics_version}}/bin/linux-x86_64:$PATH
export EPICS_BASE=/usr/local/share/base-{{epics_version}}
# {{ ansible_managed }}
#
# export EPICS base path and configuration to interact with KARA's IOCs or LASMagLab's IOCs
export LD_LIBRARY_PATH=/usr/local/share/base-{{ epics_version }}/lib/linux-x86_64:$LD_LIBRARY_PATH
{% if epics_ca_addr_list %}
export EPICS_CA_ADDR_LIST={{ epics_ca_addr_list }}
{% endif %}
export PATH=/usr/local/share/base-{{ epics_version }}/bin/linux-x86_64:$PATH
export EPICS_BASE=/usr/local/share/base-{{ epics_version }}
export EPICS_HOST_ARCH=linux-x86_64
export HOST_ARCH=linux-x86_64
......@@ -98,7 +98,7 @@
# This should be deleted when the Arial task is working
- name: hack Helvetica into KIT styles due to broken font installation
lineinfile:
line: "\\\\RequirePackage{helvet}"
line: "\\RequirePackage{helvet}"
regexp: "\\\\RequirePackage{(uarial|helvet)}"
dest: "{{ texpath }}/tex/latex/KIT/{{ item }}"
backup: yes
......
......@@ -9,6 +9,8 @@
routers: 192.168.127.10
broadcast: 192.168.127.255
host_list: host-list-cn-tgu
- epics_ca_addr_list: "169.254.1.1 169.254.1.3:20000 169.254.1.3:20002"
roles:
- dhcpd
- epics
- tgulab
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment