|
28 | 28 | when: not os|startswith("zos") |
29 | 29 | group: name="{{ server_user }}" |
30 | 30 |
|
31 | | -- name: User | create file system on larger disk |
32 | | - filesystem: |
33 | | - fstype: ext4 |
34 | | - dev: "{{ additional_drive }}" |
35 | | - when: "'rhel72-s390x' in inventory_hostname" |
36 | | - |
37 | | -- name: User | ensure larger disk is mounted |
38 | | - mount: |
39 | | - name: /data |
40 | | - src: "{{ additional_drive }}" |
41 | | - fstype: ext4 |
42 | | - state: mounted |
43 | | - when: "'rhel72-s390x' in inventory_hostname" |
44 | | - |
45 | 31 | - name: create user |
46 | | - when: "not os|startswith('zos') and not 'rhel72-s390x' in inventory_hostname" |
| 32 | + when: "not os|startswith('zos')" |
47 | 33 | user: |
48 | 34 | name: "{{ server_user }}" |
49 | 35 | group: "{{ server_user }}" |
50 | 36 | shell: "{{ bash_path[os|stripversion]|default('/bin/bash') }}" |
51 | 37 |
|
52 | | -- name: create user for rhel72-s390x |
53 | | - user: |
54 | | - name: "{{ server_user }}" |
55 | | - group: "{{ server_user }}" |
56 | | - home: "/data/{{server_user }}" |
57 | | - shell: "{{ bash_path[os|stripversion]|default('/bin/bash') }}" |
58 | | - when: "'rhel72-s390x' in inventory_hostname" |
59 | | - |
60 | | -- name: create symbolic link for home directory on rhel72-s390x |
61 | | - file: |
62 | | - src: "/data/{{ server_user }}" |
63 | | - dest: "/home/{{ server_user }}" |
64 | | - state: link |
65 | | - when: "'rhel72-s390x' in inventory_hostname" |
66 | | - |
67 | | -# devtools6_s390x_src should be defined in the host_vars file to be one of |
68 | | -# current hosts that has set RPMs already (in /data/devtoolset-6-s390x-rpms/). |
69 | | -# Example: |
70 | | -# devtools6_s390x_src: test-linuxonecc-rhel72-s390x-1 |
71 | | -- name: copy devtools-6 to control host |
72 | | - local_action: command rsync -ar {{ devtools6_s390x_src }}:/data/devtoolset-6-s390x-rpms/ /tmp/devtoolset-6-s390x-rpms/ |
73 | | - when: "'rhel72-s390x' in inventory_hostname" |
74 | | - |
75 | | -- name: copy devtools-6 to remote host |
76 | | - synchronize: |
77 | | - src: /tmp/devtoolset-6-s390x-rpms/ |
78 | | - dest: /data/devtoolset-6-s390x-rpms/ |
79 | | - recursive: true |
80 | | - when: "'rhel72-s390x' in inventory_hostname" |
81 | | - |
82 | | -- name: install devtools-6 on remote host |
83 | | - shell: yum install -y /data/devtoolset-6-s390x-rpms/* |
84 | | - async: 3600 |
85 | | - poll: 10 |
86 | | - when: "'rhel72-s390x' in inventory_hostname" |
87 | | - |
88 | 38 | - name: add ::1 to /etc/hosts for ipv6 compat |
89 | 39 | when: not os|startswith("zos") |
90 | 40 | lineinfile: |
|
123 | 73 | - "{{ role_path }}/tasks/partials/tap2junit/pip.yml" |
124 | 74 | skip: true |
125 | 75 |
|
126 | | -- name: Firewall | add rule to allow accepting multicast |
127 | | - lineinfile: |
128 | | - dest: /etc/sysconfig/iptables |
129 | | - insertafter: ":OUTPUT ACCEPT.*]" |
130 | | - line: "-A INPUT -m pkttype --pkt-type multicast -j ACCEPT" |
131 | | - when: "'rhel72-s390x' in inventory_hostname" |
132 | | - |
133 | | -- name: Firewall | add basic rule to allow communication locally |
134 | | - lineinfile: |
135 | | - dest: /etc/sysconfig/iptables |
136 | | - insertafter: ":OUTPUT ACCEPT.*]" |
137 | | - line: "-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT" |
138 | | - when: "'rhel72-s390x' in inventory_hostname" |
139 | | - |
140 | | -- name: Firewall | add additional rule to allow communication from 127.0.0.2 |
141 | | - lineinfile: |
142 | | - dest: /etc/sysconfig/iptables |
143 | | - insertafter: ":OUTPUT ACCEPT.*]" |
144 | | - line: "-A INPUT -s 127.0.0.2/32 -d 127.0.0.1/32 -j ACCEPT" |
145 | | - when: "'rhel72-s390x' in inventory_hostname" |
146 | | - |
147 | | -- name: Firewall | make the new firewall rules take effect |
148 | | - command: systemctl restart iptables |
149 | | - when: "'rhel72-s390x' in inventory_hostname" |
150 | | - |
151 | 76 | - name: download slave.jar |
152 | 77 | when: not os|startswith("zos") |
153 | 78 | get_url: |
|
0 commit comments