|
40 | 40 | - name: Make EESSI CVMFS domain configuration file |
41 | 41 | ansible.builtin.copy: |
42 | 42 | content: | |
43 | | - # Stratum 1 servers for the eessi.io domain |
44 | | - CVMFS_SERVER_URL="{{ item.urls | join(';') }}" |
45 | | -
|
46 | 43 | # Public keys for the eessi.io domain |
47 | 44 | CVMFS_KEYS_DIR="/etc/cvmfs/keys/{{ item.domain }}" |
48 | 45 |
|
|
51 | 48 |
|
52 | 49 | # The client profile is supposed to be set in /etc/cvmfs/default.local |
53 | 50 | if [ "$CVMFS_CLIENT_PROFILE" = "single" ]; then |
54 | | - if [ "$CVMFS_HTTP_PROXY" = "" ]; then |
55 | | - # For individual clients (laptops, clusters < 5 nodes), use a site proxy |
56 | | - # where possible and otherwise a direct stratum 1 connection |
57 | | - CVMFS_HTTP_PROXY="DIRECT" |
58 | | - fi |
| 51 | + if [ "$CVMFS_HTTP_PROXY" = "" ]; then |
| 52 | + # For individual clients (laptops, clusters < 5 nodes), use a site proxy |
| 53 | + # where possible and otherwise a direct stratum 1 connection |
| 54 | + CVMFS_HTTP_PROXY="DIRECT" |
| 55 | + fi |
| 56 | + fi |
| 57 | +
|
| 58 | + # Check if we should use a CDN |
| 59 | + CVMFS_USE_CDN="$CVMFS_USE_CDN" |
| 60 | + if [ -z "$CVMFS_USE_CDN" ] && [ "$CVMFS_HTTP_PROXY" = "DIRECT" ] || [ "$CVMFS_HTTP_PROXY" = "auto;DIRECT" ]; then |
| 61 | + CVMFS_USE_CDN="yes" |
| 62 | + fi |
| 63 | +
|
| 64 | + # Stratum 1 servers for the eessi.io domain |
| 65 | + if [ "$CVMFS_USE_CDN" = "yes" ]; then |
| 66 | + CVMFS_SERVER_URL="{{ eessi_cvmfs_server_cdn_urls | selectattr('domain', 'equalto', 'eessi.io') | map(attribute='urls') | sum(start=[]) | join(';') }}" |
| 67 | + else |
| 68 | + CVMFS_SERVER_URL="{{ eessi_cvmfs_server_urls | selectattr('domain', 'equalto', 'eessi.io') | map(attribute='urls') | sum(start=[]) | join(';') }}" |
59 | 69 | fi |
60 | 70 |
|
61 | 71 | dest: "{{ package_source_dir }}/etc/cvmfs/domain.d/{{ item.domain }}.conf" |
|
0 commit comments