質問編集履歴
1
expectの使い方で詰まってます。ansible-playbook実行時の具体的なエラーメッセージとansible-playbookの内容を追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,9 +16,7 @@
|
|
16
16
|
|
17
17
|
具体的には以下の通りです。
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
1 パッケージファイルのアップロード
|
19
|
+
1 パッケージファイルのアップロード
|
22
20
|
|
23
21
|
rpm -ivh esets-4.0.8.x86_64.rpm
|
24
22
|
|
@@ -42,4 +40,170 @@
|
|
42
40
|
|
43
41
|
|
44
42
|
|
43
|
+
---
|
44
|
+
|
45
|
+
(2016/08/27追記)
|
46
|
+
|
47
|
+
コメントありがとうございました。
|
48
|
+
|
49
|
+
expectの使い方を理解しきてなくて、現在の詰まっている状況を追加で質問させてもらいました。。
|
50
|
+
|
51
|
+
アドバイス、ヒントなどいただけるとありがたいです!
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
**ansible-playbook実行時のエラーメッセージです。**
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
---
|
64
|
+
|
65
|
+
fatal: [192.168.33.27]: FAILED! => {"changed": true, "cmd": ["sh", "/tmp/esets.x86_64.rpm.bin"], "delta": "0:00:00.009306", "end": "2016-08-27 10:56:13.881411", "failed": true, "rc": 1, "start": "2016-08-27 10:56:13.872105", "stderr": "", "stdout": "This is ESET Security distribution script. Press Enter to show the Licence...\n(press q after you have read the License to continue extraction)", "stdout_lines": ["This is ESET Security distribution script. Press Enter to show the Licence...", "(press q after you have read the License to continue extraction)"], "warnings": []}
|
66
|
+
|
67
|
+
```
|
68
|
+
|
69
|
+
コマンド実行時の状況
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
$ ansible-playbook -i hosts eset_install.yml
|
74
|
+
|
75
|
+
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure
|
76
|
+
|
77
|
+
become_method is 'sudo' (default).
|
78
|
+
|
79
|
+
This feature will be removed in a future release.
|
80
|
+
|
81
|
+
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
PLAY [test-svr] ****************************************************************
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
TASK [setup] *******************************************************************
|
90
|
+
|
91
|
+
ok: [192.168.33.27]
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
TASK [glibc.i686 install] ******************************************************
|
96
|
+
|
97
|
+
ok: [192.168.33.27]
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
TASK [Install libselinux-python] ***********************************************
|
102
|
+
|
103
|
+
ok: [192.168.33.27]
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
TASK [Check status of selinux] *************************************************
|
108
|
+
|
109
|
+
changed: [192.168.33.27]
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
TASK [ESET installser upload to server] ****************************************
|
114
|
+
|
115
|
+
ok: [192.168.33.27]
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
TASK [ESET nod32.inc LisenceFile upload to server] *****************************
|
120
|
+
|
121
|
+
ok: [192.168.33.27]
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
TASK [Run ESET install shell] **************************************************
|
126
|
+
|
127
|
+
fatal: [192.168.33.27]: FAILED! => {"changed": true, "cmd": ["sh", "/tmp/esets.x86_64.rpm.bin"], "delta": "0:00:00.009306", "end": "2016-08-27 10:56:13.881411", "failed": true, "rc": 1, "start": "2016-08-27 10:56:13.872105", "stderr": "", "stdout": "This is ESET Security distribution script. Press Enter to show the Licence...\n(press q after you have read the License to continue extraction)", "stdout_lines": ["This is ESET Security distribution script. Press Enter to show the Licence...", "(press q after you have read the License to continue extraction)"], "warnings": []}
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
NO MORE HOSTS LEFT *************************************************************
|
132
|
+
|
133
|
+
[WARNING]: Could not create retry file 'eset_install.retry'. [Errno 2] No such
|
134
|
+
|
135
|
+
file or directory: ''
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
PLAY RECAP *********************************************************************
|
142
|
+
|
143
|
+
192.168.33.27 : ok=6 changed=1 unreachable=0 failed=1
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
$
|
148
|
+
|
149
|
+
```
|
150
|
+
|
151
|
+
ansible-playbookの内容
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
---
|
156
|
+
|
157
|
+
```
|
158
|
+
|
159
|
+
---
|
160
|
+
|
161
|
+
- hosts: test-svr
|
162
|
+
|
163
|
+
sudo: yes
|
164
|
+
|
165
|
+
tasks:
|
166
|
+
|
167
|
+
- name: glibc.i686 install
|
168
|
+
|
169
|
+
yum: name=glibc.i686 state=latest
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
- name: Install libselinux-python
|
174
|
+
|
175
|
+
yum: name=libselinux-python state=present
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
- name: Check status of selinux
|
180
|
+
|
181
|
+
shell: getenforce
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
- name: ESET installser upload to server
|
186
|
+
|
187
|
+
copy: src=/home/ansible/files/installer/esets.x86_64.rpm.bin dest=/tmp/esets.x86_64.rpm.bin mode=755
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
- name: ESET nod32.inc LisenceFile upload to server
|
192
|
+
|
193
|
+
copy: src=/home/ansible/files/installer/nod32.lic dest=/tmp/nod32.lic
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
- name: Run ESET install shell
|
198
|
+
|
199
|
+
command: sh /tmp/esets.x86_64.rpm.bin
|
200
|
+
|
201
|
+
```
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
45
209
|
何卒宜しくお願い致します。
|