|
9 | 9 |
|
10 | 10 | - name: SGE | Template act_qmaster |
11 | 11 | template: src=act_qmaster.j2 dest=/var/lib/gridengine/default/common/act_qmaster |
| 12 | + when: docker is not defined |
12 | 13 |
|
13 | 14 | - name: SGE | Ensure gridengine-master started |
14 | 15 | service: name=gridengine-master state=started |
|
17 | 18 | command: qconf -as {{ inventory_hostname }} |
18 | 19 | register: configure_master_as |
19 | 20 | changed_when: not 'already exists' in configure_master_as.stderr |
| 21 | + when: docker is not defined |
20 | 22 |
|
21 | 23 | - name: SGE | Make a directory for our SGE templates |
22 | 24 | file: state=directory path=/etc/gridengine/templates mode=0744 |
| 25 | + when: docker is not defined |
23 | 26 |
|
24 | 27 | # setup memory as a consumable resource |
25 | 28 | - name: SGE | Template memory configuration file |
26 | 29 | template: src=sc.j2 dest=/etc/gridengine/templates/sge_sc |
27 | 30 | register: memory_template |
| 31 | + when: docker is not defined |
28 | 32 |
|
29 | 33 | - name: SGE | Setup memory as consumable resource |
30 | 34 | command: qconf -Mc /etc/gridengine/templates/sge_sc |
|
38 | 42 | shell: qconf -su users | grep -E "^entries" | cut -f2 -d " " |
39 | 43 | register: sge_current_users |
40 | 44 | changed_when: false |
| 45 | + when: docker is not defined |
41 | 46 |
|
42 | 47 | - name: SGE | Add the capsid user |
43 | 48 | command: qconf -au capsid users |
44 | | - when: not 'capsid' in sge_current_users.stdout.split(',') |
| 49 | + when: docker is not defined and not 'capsid' in sge_current_users.stdout.split(',') |
45 | 50 |
|
46 | 51 | # loop through and template worker hosts |
47 | 52 | - name: SGE | Generate execution host templates |
48 | 53 | template: src=execution_host.j2 dest=/etc/gridengine/templates/sge_execution_host_{{ item }}.sh mode=0555 |
49 | | - when: not single_node |
| 54 | + when: not single_node and docker is not defined |
50 | 55 | with_items: groups.worker |
51 | 56 | register: execution_host_template |
52 | 57 |
|
53 | 58 | # loop through and setup worker hosts, if this was better it would modify existing hosts as well instead of ignoring errors |
54 | 59 | - name: SGE | Add worker hosts as execution hosts |
55 | 60 | shell: export EDITOR=/etc/gridengine/templates/sge_execution_host_{{ item }}.sh && qconf -ae ; qconf -me {{ item }} |
56 | 61 | with_items: groups.worker |
57 | | - when: execution_host_template.changed |
| 62 | + when: execution_host_template.changed |
58 | 63 | ignore_errors: yes |
59 | 64 |
|
60 | 65 | # add the master as an execution host if we only have one node |
61 | 66 | - name: SGE | Single node execution host templates |
62 | 67 | template: src=execution_selfhost.j2 dest=/etc/gridengine/templates/sge_execution_host_master.sh mode=0555 |
63 | 68 | register: execution_host_template |
64 | | - when: single_node |
| 69 | + when: single_node and docker is not defined |
65 | 70 |
|
66 | 71 | - name: SGE | Single node host as execution host |
67 | 72 | shell: export EDITOR=/etc/gridengine/templates/sge_execution_host_master.sh && qconf -ae ; qconf -me master |
|
74 | 79 | ignore_errors: yes |
75 | 80 | register: sge_current_host_groups |
76 | 81 | changed_when: false |
| 82 | + when: docker is not defined |
77 | 83 |
|
78 | 84 | # The template now handles the hostlist properly |
79 | 85 | - name: SGE | Template host group configuration |
80 | 86 | template: src=ahgrp.j2 dest=/etc/gridengine/templates/sge_ahgrp |
81 | | - when: not '@allhosts' in sge_current_host_groups.stdout_lines |
| 87 | + when: docker is not defined and not '@allhosts' in sge_current_host_groups.stdout_lines |
82 | 88 |
|
83 | 89 | - name: SGE | Add the host group configuration |
84 | 90 | command: qconf -Ahgrp /etc/gridengine/templates/sge_ahgrp |
85 | | - when: not '@allhosts' in sge_current_host_groups.stdout_lines |
| 91 | + when: docker is not defined and not '@allhosts' in sge_current_host_groups.stdout_lines |
86 | 92 |
|
87 | 93 | # Again, we don't want to do this if it already exists |
88 | 94 | - name: SGE | Check current queues |
89 | 95 | command: qconf -sql |
90 | 96 | ignore_errors: yes |
91 | 97 | register: sge_current_queues |
92 | 98 | changed_when: false |
| 99 | + when: docker is not defined |
93 | 100 |
|
94 | 101 | # template handles hostlist, worker queue slots, target load average |
95 | 102 | - name: SGE | Template main queue |
96 | 103 | template: src=aq.j2 dest=/etc/gridengine/templates/sge_aq |
97 | 104 | register: main_queue_template |
| 105 | + when: docker is not defined |
98 | 106 |
|
99 | 107 | - name: SGE | Add main queue |
100 | 108 | command: qconf -Aq /etc/gridengine/templates/sge_aq |
101 | | - when: not 'main.q' in sge_current_queues.stdout_lines |
| 109 | + when: docker is not defined and not 'main.q' in sge_current_queues.stdout_lines |
102 | 110 |
|
103 | 111 | - name: SGE | Template modify queue |
104 | 112 | template: src=mq.j2 dest=/etc/gridengine/templates/sge_mq.sh mode=0555 |
105 | 113 | register: modify_main_queue_template |
| 114 | + when: docker is not defined |
106 | 115 |
|
107 | 116 | - name: SGE | Modify main queue |
108 | 117 | shell: export EDITOR=/etc/gridengine/templates/sge_mq.sh && qconf -mq main.q |
|
111 | 120 | - name: SGE | Check parallel environment status |
112 | 121 | command: qconf -sp serial |
113 | 122 | ignore_errors: yes |
114 | | - when: grid_engine_master == True |
| 123 | + when: grid_engine_master == True and docker is not defined |
115 | 124 | register: sge_parallel_env |
116 | 125 | changed_when: false |
117 | 126 |
|
118 | 127 | - name: SGE | Template serial parallel environment file |
119 | 128 | template: src=serial_profile.j2 dest=/etc/gridengine/templates/sge_serial_profile |
120 | 129 | register: serial_profile |
| 130 | + when: docker is not defined |
121 | 131 |
|
122 | 132 | # Again, if this was better, we would re-create the environment if there were changes in the template |
123 | 133 | - name: SGE | Setup serial profile environment |
124 | 134 | command: "{{ item }}" |
125 | 135 | with_items: |
126 | 136 | - qconf -Ap /etc/gridengine/templates/sge_serial_profile |
127 | 137 | - qconf -aattr queue pe_list serial main.q |
128 | | - when: "'serial is not a parallel environment' in sge_parallel_env.stderr or serial_profile.changed" |
| 138 | + when: "docker is not defined and 'serial is not a parallel environment' in sge_parallel_env.stderr or docker is not defined and serial_profile.changed" |
129 | 139 |
|
130 | 140 | # TODO: bindle 1.2.1 re-runs the sge setup script on reboot. Determine whether this is really needed |
0 commit comments