This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pre_exam.txt
7159 lines (6641 loc) · 227 KB
/
pre_exam.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Tue 13 Dec 2022 14:02:49 EET
+ hostname
Keisukes-Macintosh.local
+ ansible-playbook infra.yaml --diff
PLAY [Set up] ******************************************************************
TASK [Gathering Facts] *********************************************************
ok: [vm3]
ok: [vm2]
ok: [vm1]
TASK [setup] *******************************************************************
ok: [vm1]
ok: [vm2]
ok: [vm3]
PLAY [Default] *****************************************************************
TASK [init : Update APT cache] *************************************************
changed: [vm3]
changed: [vm1]
changed: [vm2]
TASK [init : Update CA certificates] *******************************************
The following packages will be upgraded:
ca-certificates
1 upgraded, 0 newly installed, 0 to remove and 230 not upgraded.
changed: [vm3]
The following packages will be upgraded:
ca-certificates
1 upgraded, 0 newly installed, 0 to remove and 230 not upgraded.
changed: [vm1]
The following packages will be upgraded:
ca-certificates
1 upgraded, 0 newly installed, 0 to remove and 230 not upgraded.
changed: [vm2]
TASK [init : Wait for 20 sec] **************************************************
Pausing for 20 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
ok: [vm1]
TASK [init : Add /etc/hosts] ***************************************************
--- before: /etc/hosts (content)
+++ after: /etc/hosts (content)
@@ -1,3 +1,4 @@
+127.0.0.1 localhost vm2
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
changed: [vm2]
--- before: /etc/hosts (content)
+++ after: /etc/hosts (content)
@@ -1,3 +1,4 @@
+127.0.0.1 localhost vm3
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
changed: [vm3]
--- before: /etc/hosts (content)
+++ after: /etc/hosts (content)
@@ -1,3 +1,4 @@
+127.0.0.1 localhost vm1
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
changed: [vm1]
TASK [init : Set hostname] *****************************************************
--- before
+++ after
@@ -1 +1 @@
-hostname = kei5uke-3
+hostname = vm3
changed: [vm3]
--- before
+++ after
@@ -1 +1 @@
-hostname = kei5uke-2
+hostname = vm2
changed: [vm2]
--- before
+++ after
@@ -1 +1 @@
-hostname = kei5uke-1
+hostname = vm1
changed: [vm1]
TASK [users : Add user 'juri'] *************************************************
changed: [vm3]
changed: [vm2]
changed: [vm1]
TASK [users : Add user 'roman'] ************************************************
changed: [vm1]
changed: [vm3]
changed: [vm2]
TASK [users : Add SSH key for 'juri'] ******************************************
changed: [vm3]
changed: [vm1]
changed: [vm2]
TASK [users : Add SSH key for 'roman'] *****************************************
changed: [vm3]
changed: [vm2]
changed: [vm1]
TASK [node_exporter : Install Node Exporter] ***********************************
The following additional packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter-collectors smartmontools
Suggested packages:
gsmartcontrol smart-notifier mailx | mailutils
The following NEW packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter prometheus-node-exporter-collectors
smartmontools
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm3]
The following additional packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter-collectors smartmontools
Suggested packages:
gsmartcontrol smart-notifier mailx | mailutils
The following NEW packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter prometheus-node-exporter-collectors
smartmontools
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm2]
The following additional packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter-collectors smartmontools
Suggested packages:
gsmartcontrol smart-notifier mailx | mailutils
The following NEW packages will be installed:
libio-pty-perl libipc-run-perl libtime-duration-perl libtimedate-perl
moreutils prometheus-node-exporter prometheus-node-exporter-collectors
smartmontools
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm1]
TASK [node_exporter : Node Exporter arg] ***************************************
--- before: /etc/default/prometheus-node-exporter
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmptun90m8g/prometheus-node-exporter.j2
@@ -1,128 +1 @@
-# Set the command-line arguments to pass to the server.
-# Due to shell scaping, to pass backslashes for regexes, you need to double
-# them (\\d for \d). If running under systemd, you need to double them again
-# (\\\\d to mean \d), and escape newlines too.
-ARGS=""
-
-# Prometheus-node-exporter supports the following options:
-#
-# --collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
-# Regexp of devices to ignore for diskstats.
-# --collector.filesystem.ignored-mount-points="^/(dev|proc|run|sys|mnt|media|var/lib/docker)($|/)"
-# Regexp of mount points to ignore for filesystem
-# collector.
-# --collector.filesystem.ignored-fs-types="^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"
-# Regexp of filesystem types to ignore for
-# filesystem collector.
-# --collector.netdev.ignored-devices="^lo$"
-# Regexp of net devices to ignore for netdev
-# collector.
-# --collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*)|Tcp_(ActiveOpens|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts))$"
-# Regexp of fields to return for netstat
-# collector.
-# --collector.ntp.server="127.0.0.1"
-# NTP server to use for ntp collector
-# --collector.ntp.protocol-version=4
-# NTP protocol version
-# --collector.ntp.server-is-local
-# Certify that collector.ntp.server address is the
-# same local host as this collector.
-# --collector.ntp.ip-ttl=1 IP TTL to use while sending NTP query
-# --collector.ntp.max-distance=3.46608s
-# Max accumulated distance to the root
-# --collector.ntp.local-offset-tolerance=1ms
-# Offset between local clock and local ntpd time
-# to tolerate
-# --path.procfs="/proc" procfs mountpoint.
-# --path.sysfs="/sys" sysfs mountpoint.
-# --collector.qdisc.fixtures=""
-# test fixtures to use for qdisc collector
-# end-to-end testing
-# --collector.runit.servicedir="/etc/service"
-# Path to runit service directory.
-# --collector.supervisord.url="http://localhost:9001/RPC2"
-# XML RPC endpoint.
-# --collector.systemd.unit-whitelist=".+"
-# Regexp of systemd units to whitelist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.unit-blacklist=".+(\\.device|\\.scope|\\.slice|\\.target)"
-# Regexp of systemd units to blacklist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.private
-# Establish a private, direct connection to
-# systemd without dbus.
-# --collector.textfile.directory="/var/lib/prometheus/node-exporter"
-# Directory to read text files with metrics from.
-# --collector.vmstat.fields="^(oom_kill|pgpg|pswp|pg.*fault).*"
-# Regexp of fields to return for vmstat collector.
-# --collector.wifi.fixtures=""
-# test fixtures to use for wifi collector metrics
-# --collector.arp Enable the arp collector (default: enabled).
-# --collector.bcache Enable the bcache collector (default: enabled).
-# --collector.bonding Enable the bonding collector (default: enabled).
-# --collector.buddyinfo Enable the buddyinfo collector (default:
-# disabled).
-# --collector.conntrack Enable the conntrack collector (default:
-# enabled).
-# --collector.cpu Enable the cpu collector (default: enabled).
-# --collector.diskstats Enable the diskstats collector (default:
-# enabled).
-# --collector.drbd Enable the drbd collector (default: disabled).
-# --collector.edac Enable the edac collector (default: enabled).
-# --collector.entropy Enable the entropy collector (default: enabled).
-# --collector.filefd Enable the filefd collector (default: enabled).
-# --collector.filesystem Enable the filesystem collector (default:
-# enabled).
-# --collector.hwmon Enable the hwmon collector (default: enabled).
-# --collector.infiniband Enable the infiniband collector (default:
-# enabled).
-# --collector.interrupts Enable the interrupts collector (default:
-# disabled).
-# --collector.ipvs Enable the ipvs collector (default: enabled).
-# --collector.ksmd Enable the ksmd collector (default: disabled).
-# --collector.loadavg Enable the loadavg collector (default: enabled).
-# --collector.logind Enable the logind collector (default: disabled).
-# --collector.mdadm Enable the mdadm collector (default: enabled).
-# --collector.meminfo Enable the meminfo collector (default: enabled).
-# --collector.meminfo_numa Enable the meminfo_numa collector (default:
-# disabled).
-# --collector.mountstats Enable the mountstats collector (default:
-# disabled).
-# --collector.netdev Enable the netdev collector (default: enabled).
-# --collector.netstat Enable the netstat collector (default: enabled).
-# --collector.nfs Enable the nfs collector (default: enabled).
-# --collector.nfsd Enable the nfsd collector (default: enabled).
-# --collector.ntp Enable the ntp collector (default: disabled).
-# --collector.qdisc Enable the qdisc collector (default: disabled).
-# --collector.runit Enable the runit collector (default: disabled).
-# --collector.sockstat Enable the sockstat collector (default:
-# enabled).
-# --collector.stat Enable the stat collector (default: enabled).
-# --collector.supervisord Enable the supervisord collector (default:
-# disabled).
-# --collector.systemd Enable the systemd collector (default: enabled).
-# --collector.tcpstat Enable the tcpstat collector (default:
-# disabled).
-# --collector.textfile Enable the textfile collector (default:
-# enabled).
-# --collector.time Enable the time collector (default: enabled).
-# --collector.uname Enable the uname collector (default: enabled).
-# --collector.vmstat Enable the vmstat collector (default: enabled).
-# --collector.wifi Enable the wifi collector (default: enabled).
-# --collector.xfs Enable the xfs collector (default: enabled).
-# --collector.zfs Enable the zfs collector (default: enabled).
-# --collector.timex Enable the timex collector (default: enabled).
-# --web.listen-address=":9100"
-# Address on which to expose metrics and web
-# interface.
-# --web.telemetry-path="/metrics"
-# Path under which to expose metrics.
-# --log.level="info" Only log messages with the given severity or
-# above. Valid levels: [debug, info, warn, error,
-# fatal]
-# --log.format="logger:stderr"
-# Set the log target and format. Example:
-# "logger:syslog?appname=bob&local=7" or
-# "logger:stdout?json=true"
+ARGS="--web.listen-address=':9100'"
changed: [vm3]
--- before: /etc/default/prometheus-node-exporter
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmp_uhsp4r7/prometheus-node-exporter.j2
@@ -1,128 +1 @@
-# Set the command-line arguments to pass to the server.
-# Due to shell scaping, to pass backslashes for regexes, you need to double
-# them (\\d for \d). If running under systemd, you need to double them again
-# (\\\\d to mean \d), and escape newlines too.
-ARGS=""
-
-# Prometheus-node-exporter supports the following options:
-#
-# --collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
-# Regexp of devices to ignore for diskstats.
-# --collector.filesystem.ignored-mount-points="^/(dev|proc|run|sys|mnt|media|var/lib/docker)($|/)"
-# Regexp of mount points to ignore for filesystem
-# collector.
-# --collector.filesystem.ignored-fs-types="^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"
-# Regexp of filesystem types to ignore for
-# filesystem collector.
-# --collector.netdev.ignored-devices="^lo$"
-# Regexp of net devices to ignore for netdev
-# collector.
-# --collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*)|Tcp_(ActiveOpens|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts))$"
-# Regexp of fields to return for netstat
-# collector.
-# --collector.ntp.server="127.0.0.1"
-# NTP server to use for ntp collector
-# --collector.ntp.protocol-version=4
-# NTP protocol version
-# --collector.ntp.server-is-local
-# Certify that collector.ntp.server address is the
-# same local host as this collector.
-# --collector.ntp.ip-ttl=1 IP TTL to use while sending NTP query
-# --collector.ntp.max-distance=3.46608s
-# Max accumulated distance to the root
-# --collector.ntp.local-offset-tolerance=1ms
-# Offset between local clock and local ntpd time
-# to tolerate
-# --path.procfs="/proc" procfs mountpoint.
-# --path.sysfs="/sys" sysfs mountpoint.
-# --collector.qdisc.fixtures=""
-# test fixtures to use for qdisc collector
-# end-to-end testing
-# --collector.runit.servicedir="/etc/service"
-# Path to runit service directory.
-# --collector.supervisord.url="http://localhost:9001/RPC2"
-# XML RPC endpoint.
-# --collector.systemd.unit-whitelist=".+"
-# Regexp of systemd units to whitelist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.unit-blacklist=".+(\\.device|\\.scope|\\.slice|\\.target)"
-# Regexp of systemd units to blacklist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.private
-# Establish a private, direct connection to
-# systemd without dbus.
-# --collector.textfile.directory="/var/lib/prometheus/node-exporter"
-# Directory to read text files with metrics from.
-# --collector.vmstat.fields="^(oom_kill|pgpg|pswp|pg.*fault).*"
-# Regexp of fields to return for vmstat collector.
-# --collector.wifi.fixtures=""
-# test fixtures to use for wifi collector metrics
-# --collector.arp Enable the arp collector (default: enabled).
-# --collector.bcache Enable the bcache collector (default: enabled).
-# --collector.bonding Enable the bonding collector (default: enabled).
-# --collector.buddyinfo Enable the buddyinfo collector (default:
-# disabled).
-# --collector.conntrack Enable the conntrack collector (default:
-# enabled).
-# --collector.cpu Enable the cpu collector (default: enabled).
-# --collector.diskstats Enable the diskstats collector (default:
-# enabled).
-# --collector.drbd Enable the drbd collector (default: disabled).
-# --collector.edac Enable the edac collector (default: enabled).
-# --collector.entropy Enable the entropy collector (default: enabled).
-# --collector.filefd Enable the filefd collector (default: enabled).
-# --collector.filesystem Enable the filesystem collector (default:
-# enabled).
-# --collector.hwmon Enable the hwmon collector (default: enabled).
-# --collector.infiniband Enable the infiniband collector (default:
-# enabled).
-# --collector.interrupts Enable the interrupts collector (default:
-# disabled).
-# --collector.ipvs Enable the ipvs collector (default: enabled).
-# --collector.ksmd Enable the ksmd collector (default: disabled).
-# --collector.loadavg Enable the loadavg collector (default: enabled).
-# --collector.logind Enable the logind collector (default: disabled).
-# --collector.mdadm Enable the mdadm collector (default: enabled).
-# --collector.meminfo Enable the meminfo collector (default: enabled).
-# --collector.meminfo_numa Enable the meminfo_numa collector (default:
-# disabled).
-# --collector.mountstats Enable the mountstats collector (default:
-# disabled).
-# --collector.netdev Enable the netdev collector (default: enabled).
-# --collector.netstat Enable the netstat collector (default: enabled).
-# --collector.nfs Enable the nfs collector (default: enabled).
-# --collector.nfsd Enable the nfsd collector (default: enabled).
-# --collector.ntp Enable the ntp collector (default: disabled).
-# --collector.qdisc Enable the qdisc collector (default: disabled).
-# --collector.runit Enable the runit collector (default: disabled).
-# --collector.sockstat Enable the sockstat collector (default:
-# enabled).
-# --collector.stat Enable the stat collector (default: enabled).
-# --collector.supervisord Enable the supervisord collector (default:
-# disabled).
-# --collector.systemd Enable the systemd collector (default: enabled).
-# --collector.tcpstat Enable the tcpstat collector (default:
-# disabled).
-# --collector.textfile Enable the textfile collector (default:
-# enabled).
-# --collector.time Enable the time collector (default: enabled).
-# --collector.uname Enable the uname collector (default: enabled).
-# --collector.vmstat Enable the vmstat collector (default: enabled).
-# --collector.wifi Enable the wifi collector (default: enabled).
-# --collector.xfs Enable the xfs collector (default: enabled).
-# --collector.zfs Enable the zfs collector (default: enabled).
-# --collector.timex Enable the timex collector (default: enabled).
-# --web.listen-address=":9100"
-# Address on which to expose metrics and web
-# interface.
-# --web.telemetry-path="/metrics"
-# Path under which to expose metrics.
-# --log.level="info" Only log messages with the given severity or
-# above. Valid levels: [debug, info, warn, error,
-# fatal]
-# --log.format="logger:stderr"
-# Set the log target and format. Example:
-# "logger:syslog?appname=bob&local=7" or
-# "logger:stdout?json=true"
+ARGS="--web.listen-address=':9100'"
changed: [vm1]
--- before: /etc/default/prometheus-node-exporter
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmp0saa18a6/prometheus-node-exporter.j2
@@ -1,128 +1 @@
-# Set the command-line arguments to pass to the server.
-# Due to shell scaping, to pass backslashes for regexes, you need to double
-# them (\\d for \d). If running under systemd, you need to double them again
-# (\\\\d to mean \d), and escape newlines too.
-ARGS=""
-
-# Prometheus-node-exporter supports the following options:
-#
-# --collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
-# Regexp of devices to ignore for diskstats.
-# --collector.filesystem.ignored-mount-points="^/(dev|proc|run|sys|mnt|media|var/lib/docker)($|/)"
-# Regexp of mount points to ignore for filesystem
-# collector.
-# --collector.filesystem.ignored-fs-types="^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$"
-# Regexp of filesystem types to ignore for
-# filesystem collector.
-# --collector.netdev.ignored-devices="^lo$"
-# Regexp of net devices to ignore for netdev
-# collector.
-# --collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*)|Tcp_(ActiveOpens|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts))$"
-# Regexp of fields to return for netstat
-# collector.
-# --collector.ntp.server="127.0.0.1"
-# NTP server to use for ntp collector
-# --collector.ntp.protocol-version=4
-# NTP protocol version
-# --collector.ntp.server-is-local
-# Certify that collector.ntp.server address is the
-# same local host as this collector.
-# --collector.ntp.ip-ttl=1 IP TTL to use while sending NTP query
-# --collector.ntp.max-distance=3.46608s
-# Max accumulated distance to the root
-# --collector.ntp.local-offset-tolerance=1ms
-# Offset between local clock and local ntpd time
-# to tolerate
-# --path.procfs="/proc" procfs mountpoint.
-# --path.sysfs="/sys" sysfs mountpoint.
-# --collector.qdisc.fixtures=""
-# test fixtures to use for qdisc collector
-# end-to-end testing
-# --collector.runit.servicedir="/etc/service"
-# Path to runit service directory.
-# --collector.supervisord.url="http://localhost:9001/RPC2"
-# XML RPC endpoint.
-# --collector.systemd.unit-whitelist=".+"
-# Regexp of systemd units to whitelist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.unit-blacklist=".+(\\.device|\\.scope|\\.slice|\\.target)"
-# Regexp of systemd units to blacklist. Units must
-# both match whitelist and not match blacklist to
-# be included.
-# --collector.systemd.private
-# Establish a private, direct connection to
-# systemd without dbus.
-# --collector.textfile.directory="/var/lib/prometheus/node-exporter"
-# Directory to read text files with metrics from.
-# --collector.vmstat.fields="^(oom_kill|pgpg|pswp|pg.*fault).*"
-# Regexp of fields to return for vmstat collector.
-# --collector.wifi.fixtures=""
-# test fixtures to use for wifi collector metrics
-# --collector.arp Enable the arp collector (default: enabled).
-# --collector.bcache Enable the bcache collector (default: enabled).
-# --collector.bonding Enable the bonding collector (default: enabled).
-# --collector.buddyinfo Enable the buddyinfo collector (default:
-# disabled).
-# --collector.conntrack Enable the conntrack collector (default:
-# enabled).
-# --collector.cpu Enable the cpu collector (default: enabled).
-# --collector.diskstats Enable the diskstats collector (default:
-# enabled).
-# --collector.drbd Enable the drbd collector (default: disabled).
-# --collector.edac Enable the edac collector (default: enabled).
-# --collector.entropy Enable the entropy collector (default: enabled).
-# --collector.filefd Enable the filefd collector (default: enabled).
-# --collector.filesystem Enable the filesystem collector (default:
-# enabled).
-# --collector.hwmon Enable the hwmon collector (default: enabled).
-# --collector.infiniband Enable the infiniband collector (default:
-# enabled).
-# --collector.interrupts Enable the interrupts collector (default:
-# disabled).
-# --collector.ipvs Enable the ipvs collector (default: enabled).
-# --collector.ksmd Enable the ksmd collector (default: disabled).
-# --collector.loadavg Enable the loadavg collector (default: enabled).
-# --collector.logind Enable the logind collector (default: disabled).
-# --collector.mdadm Enable the mdadm collector (default: enabled).
-# --collector.meminfo Enable the meminfo collector (default: enabled).
-# --collector.meminfo_numa Enable the meminfo_numa collector (default:
-# disabled).
-# --collector.mountstats Enable the mountstats collector (default:
-# disabled).
-# --collector.netdev Enable the netdev collector (default: enabled).
-# --collector.netstat Enable the netstat collector (default: enabled).
-# --collector.nfs Enable the nfs collector (default: enabled).
-# --collector.nfsd Enable the nfsd collector (default: enabled).
-# --collector.ntp Enable the ntp collector (default: disabled).
-# --collector.qdisc Enable the qdisc collector (default: disabled).
-# --collector.runit Enable the runit collector (default: disabled).
-# --collector.sockstat Enable the sockstat collector (default:
-# enabled).
-# --collector.stat Enable the stat collector (default: enabled).
-# --collector.supervisord Enable the supervisord collector (default:
-# disabled).
-# --collector.systemd Enable the systemd collector (default: enabled).
-# --collector.tcpstat Enable the tcpstat collector (default:
-# disabled).
-# --collector.textfile Enable the textfile collector (default:
-# enabled).
-# --collector.time Enable the time collector (default: enabled).
-# --collector.uname Enable the uname collector (default: enabled).
-# --collector.vmstat Enable the vmstat collector (default: enabled).
-# --collector.wifi Enable the wifi collector (default: enabled).
-# --collector.xfs Enable the xfs collector (default: enabled).
-# --collector.zfs Enable the zfs collector (default: enabled).
-# --collector.timex Enable the timex collector (default: enabled).
-# --web.listen-address=":9100"
-# Address on which to expose metrics and web
-# interface.
-# --web.telemetry-path="/metrics"
-# Path under which to expose metrics.
-# --log.level="info" Only log messages with the given severity or
-# above. Valid levels: [debug, info, warn, error,
-# fatal]
-# --log.format="logger:stderr"
-# Set the log target and format. Example:
-# "logger:syslog?appname=bob&local=7" or
-# "logger:stdout?json=true"
+ARGS="--web.listen-address=':9100'"
changed: [vm2]
TASK [node_exporter : Enable Node exporter] ************************************
ok: [vm1]
ok: [vm2]
ok: [vm3]
TASK [rsyslog : Install 50-telegraf.conf] **************************************
--- before
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpqeg64r_2/50-telegraf.conf.j2
@@ -0,0 +1,5 @@
+$ActionQueueType LinkedList # use asynchronous processing
+$ActionQueueFileName srvrfwd # set file name, also enables disk mode
+$ActionResumeRetryCount -1 # infinite retries on insert failure
+$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
+*.* @vm3:6514;RSYSLOG_SyslogProtocol23Format
changed: [vm1]
--- before
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpjwb9w63p/50-telegraf.conf.j2
@@ -0,0 +1,5 @@
+$ActionQueueType LinkedList # use asynchronous processing
+$ActionQueueFileName srvrfwd # set file name, also enables disk mode
+$ActionResumeRetryCount -1 # infinite retries on insert failure
+$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
+*.* @vm3:6514;RSYSLOG_SyslogProtocol23Format
changed: [vm2]
--- before
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmp5dnuz8bq/50-telegraf.conf.j2
@@ -0,0 +1,5 @@
+$ActionQueueType LinkedList # use asynchronous processing
+$ActionQueueFileName srvrfwd # set file name, also enables disk mode
+$ActionResumeRetryCount -1 # infinite retries on insert failure
+$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down
+*.* @vm3:6514;RSYSLOG_SyslogProtocol23Format
changed: [vm3]
TASK [docker : Install docker] *************************************************
The following additional packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base libidn11 pigz
python3-websocket runc ubuntu-fan
Suggested packages:
ifupdown aufs-tools cgroupfs-mount | cgroup-lite debootstrap docker-doc
rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base docker.io libidn11 pigz
python3-docker python3-websocket runc ubuntu-fan
0 upgraded, 11 newly installed, 0 to remove and 230 not upgraded.
changed: [vm2]
The following additional packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base libidn11 pigz
python3-websocket runc ubuntu-fan
Suggested packages:
ifupdown aufs-tools cgroupfs-mount | cgroup-lite debootstrap docker-doc
rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base docker.io libidn11 pigz
python3-docker python3-websocket runc ubuntu-fan
0 upgraded, 11 newly installed, 0 to remove and 230 not upgraded.
changed: [vm3]
The following additional packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base libidn11 pigz
python3-websocket runc ubuntu-fan
Suggested packages:
ifupdown aufs-tools cgroupfs-mount | cgroup-lite debootstrap docker-doc
rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
bridge-utils containerd dns-root-data dnsmasq-base docker.io libidn11 pigz
python3-docker python3-websocket runc ubuntu-fan
0 upgraded, 11 newly installed, 0 to remove and 230 not upgraded.
changed: [vm1]
TASK [docker : Enable docker] **************************************************
ok: [vm2]
ok: [vm1]
ok: [vm3]
RUNNING HANDLER [node_exporter : Restart Node Exporter] ************************
changed: [vm1]
changed: [vm3]
changed: [vm2]
RUNNING HANDLER [rsyslog : Restart Rsyslog] ************************************
changed: [vm1]
changed: [vm2]
changed: [vm3]
PLAY [Backup] ******************************************************************
TASK [backup : Create User "backup"] *******************************************
changed: [vm1]
changed: [vm3]
changed: [vm2]
TASK [backup : Add Backup Server Public Key] ***********************************
changed: [vm1]
changed: [vm2]
changed: [vm3]
TASK [backup : Restore directory] **********************************************
--- before
+++ after
@@ -1,5 +1,5 @@
{
- "owner": 0,
+ "owner": 34,
"path": "/home/backup/restore",
- "state": "absent"
+ "state": "directory"
}
changed: [vm1]
--- before
+++ after
@@ -1,5 +1,5 @@
{
- "owner": 0,
+ "owner": 34,
"path": "/home/backup/restore",
- "state": "absent"
+ "state": "directory"
}
changed: [vm3]
--- before
+++ after
@@ -1,5 +1,5 @@
{
- "owner": 0,
+ "owner": 34,
"path": "/home/backup/restore",
- "state": "absent"
+ "state": "directory"
}
changed: [vm2]
TASK [backup : Install Duplicity] **********************************************
The following additional packages will be installed:
librsync2 python3-bcrypt python3-fasteners python3-future python3-lockfile
python3-monotonic python3-paramiko
Suggested packages:
python3-boto ncftp lftp tahoe-lafs python3-swiftclient python3-pip par2
python-future-doc python-lockfile-doc python3-gssapi
The following NEW packages will be installed:
duplicity librsync2 python3-bcrypt python3-fasteners python3-future
python3-lockfile python3-monotonic python3-paramiko
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm2]
The following additional packages will be installed:
librsync2 python3-bcrypt python3-fasteners python3-future python3-lockfile
python3-monotonic python3-paramiko
Suggested packages:
python3-boto ncftp lftp tahoe-lafs python3-swiftclient python3-pip par2
python-future-doc python-lockfile-doc python3-gssapi
The following NEW packages will be installed:
duplicity librsync2 python3-bcrypt python3-fasteners python3-future
python3-lockfile python3-monotonic python3-paramiko
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm1]
The following additional packages will be installed:
librsync2 python3-bcrypt python3-fasteners python3-future python3-lockfile
python3-monotonic python3-paramiko
Suggested packages:
python3-boto ncftp lftp tahoe-lafs python3-swiftclient python3-pip par2
python-future-doc python-lockfile-doc python3-gssapi
The following NEW packages will be installed:
duplicity librsync2 python3-bcrypt python3-fasteners python3-future
python3-lockfile python3-monotonic python3-paramiko
0 upgraded, 8 newly installed, 0 to remove and 230 not upgraded.
changed: [vm3]
PLAY [DNS Bind9] ***************************************************************
TASK [bind : Install bind9] ****************************************************
The following additional packages will be installed:
bind9-dnsutils bind9-libs bind9-utils python3-ply
Suggested packages:
bind-doc resolvconf python-ply-doc
The following NEW packages will be installed:
bind9 bind9-utils python3-dnspython python3-ply
The following packages will be upgraded:
bind9-dnsutils bind9-libs
2 upgraded, 4 newly installed, 0 to remove and 228 not upgraded.
changed: [vm1]
The following additional packages will be installed:
bind9-dnsutils bind9-libs bind9-utils python3-ply
Suggested packages:
bind-doc resolvconf python-ply-doc
The following NEW packages will be installed:
bind9 bind9-utils python3-dnspython python3-ply
The following packages will be upgraded:
bind9-dnsutils bind9-libs
2 upgraded, 4 newly installed, 0 to remove and 228 not upgraded.
changed: [vm3]
The following additional packages will be installed:
bind9-dnsutils bind9-libs bind9-utils python3-ply
Suggested packages:
bind-doc resolvconf python-ply-doc
The following NEW packages will be installed:
bind9 bind9-utils python3-dnspython python3-ply
The following packages will be upgraded:
bind9-dnsutils bind9-libs
2 upgraded, 4 newly installed, 0 to remove and 228 not upgraded.
changed: [vm2]
TASK [bind : Option] ***********************************************************
changed: [vm3]
changed: [vm2]
changed: [vm1]
TASK [bind : Local] ************************************************************
--- before: /etc/bind/named.conf.local
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpkfth8u8_/named.conf.local.j2
@@ -1,8 +1,14 @@
-//
-// Do any local configuration here
-//
+zone "noobmaster69.net" {
+ type master;
+ allow-update {key nsupdate.key;};
+ allow-transfer {127.0.0.1; key transfer.key;};
+ file "db.domain";
+};
-// Consider adding the 1918 zones here, if they are not used in your
-// organization
-//include "/etc/bind/zones.rfc1918";
+zone "43.168.192.in-addr.arpa" {
+ type master;
+ allow-update {key nsupdate.key;};
+ allow-transfer {127.0.0.1; key transfer.key;};
+ file "db.domain.reverse";
+};
changed: [vm3]
--- before: /etc/bind/named.conf.local
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpu9tvckn8/named.conf.local.j2
@@ -1,8 +1,15 @@
-//
-// Do any local configuration here
-//
+zone "noobmaster69.net" {
+ type slave;
+ masters { 192.168.43.160; };
+ file "db.domain";
+};
-// Consider adding the 1918 zones here, if they are not used in your
-// organization
-//include "/etc/bind/zones.rfc1918";
+server 192.168.43.160 {
+ keys { transfer.key; };
+};
+zone "43.168.192.in-addr.arpa" {
+ type slave;
+ masters { 192.168.43.160; };
+ file "db.domain.reverse";
+};
changed: [vm1]
--- before: /etc/bind/named.conf.local
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpgnmnde4r/named.conf.local.j2
@@ -1,8 +1,15 @@
-//
-// Do any local configuration here
-//
+zone "noobmaster69.net" {
+ type slave;
+ masters { 192.168.43.160; };
+ file "db.domain";
+};
-// Consider adding the 1918 zones here, if they are not used in your
-// organization
-//include "/etc/bind/zones.rfc1918";
+server 192.168.43.160 {
+ keys { transfer.key; };
+};
+zone "43.168.192.in-addr.arpa" {
+ type slave;
+ masters { 192.168.43.160; };
+ file "db.domain.reverse";
+};
changed: [vm2]
TASK [bind : DNS Master Zone] **************************************************
skipping: [vm1]
skipping: [vm2]
--- before
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpx6s9e6rt/db.domain.j2
@@ -0,0 +1,19 @@
+$TTL 604800
+noobmaster69.net. IN SOA vm3.noobmaster69.net. keisuke.noobmaster69.net. (
+ 2 ; Serial
+ 604800 ; Refresh
+ 86400 ; Retry
+ 2419200 ; Expire
+ 604800 ) ; Negative Cache TTL
+;
+
+noobmaster69.net. IN NS vm3
+noobmaster69.net. IN NS vm1
+noobmaster69.net. IN NS vm2
+
+
+vm1 IN A 192.168.43.38
+
+vm2 IN A 192.168.43.82
+
+vm3 IN A 192.168.43.160
changed: [vm3]
TASK [bind : Reverse DNS Master Zone] ******************************************
skipping: [vm1]
skipping: [vm2]
--- before
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpvtk9lo53/db.domain.reverse.j2
@@ -0,0 +1,15 @@
+$TTL 604800
+43.168.192.in-addr.arpa. IN SOA vm3.noobmaster69.net. keisuke.noobmaster69.net. (
+ 2 ; Serial
+ 604800 ; Refresh
+ 86400 ; Retry
+ 2419200 ; Expire
+ 604800 ) ; Negative Cache TTL
+;
+
+43.168.192.in-addr.arpa. IN NS vm3.noobmaster69.net.
+43.168.192.in-addr.arpa. IN NS vm1.noobmaster69.net.
+43.168.192.in-addr.arpa. IN NS vm2.noobmaster69.net.
+38 IN PTR vm1.noobmaster69.net.
+82 IN PTR vm2.noobmaster69.net.
+160 IN PTR vm3.noobmaster69.net.
changed: [vm3]
TASK [bind : Enable bind9] *****************************************************
ok: [vm3]
ok: [vm1]
ok: [vm2]
TASK [bind : execute handlers] *************************************************
RUNNING HANDLER [bind : Restart Bind9] *****************************************
changed: [vm3]
changed: [vm1]
changed: [vm2]
RUNNING HANDLER [bind : RNDC Reload] *******************************************
changed: [vm1]
changed: [vm2]
changed: [vm3]
TASK [bind : Wait for 15 sec] **************************************************
Pausing for 15 seconds
(ctrl+C then 'C' = continue early, ctrl+C then 'A' = abort)
ok: [vm3]
TASK [bind : Create A records] *************************************************
changed: [vm3] => (item={'key': 'backup', 'value': '192.168.42.132'})
TASK [bind : Create CNAME records] *********************************************
changed: [vm3] => (item={'key': 'grafana', 'value': 'vm3'})
changed: [vm3] => (item={'key': 'influxdb', 'value': 'vm3'})
changed: [vm3] => (item={'key': 'lb1', 'value': 'vm1'})
changed: [vm3] => (item={'key': 'lb2', 'value': 'vm2'})
changed: [vm3] => (item={'key': 'mysql1', 'value': 'vm1'})
changed: [vm3] => (item={'key': 'mysql2', 'value': 'vm2'})
changed: [vm3] => (item={'key': 'ns1', 'value': 'vm3'})
changed: [vm3] => (item={'key': 'ns2', 'value': 'vm1'})
changed: [vm3] => (item={'key': 'ns3', 'value': 'vm2'})
changed: [vm3] => (item={'key': 'prometheus', 'value': 'vm3'})
changed: [vm3] => (item={'key': 'web1', 'value': 'vm1'})
changed: [vm3] => (item={'key': 'web2', 'value': 'vm2'})
TASK [bind_exporter : Install Bind Exporter] ***********************************
The following NEW packages will be installed:
prometheus-bind-exporter
0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded.
changed: [vm2]
The following NEW packages will be installed:
prometheus-bind-exporter
0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded.
changed: [vm1]
The following NEW packages will be installed:
prometheus-bind-exporter
0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded.
changed: [vm3]
TASK [bind_exporter : Bind-exporter args] **************************************
--- before: /etc/default/prometheus-bind-exporter
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpidsmqghj/prometheus-bind-exporter.j2
@@ -1,24 +1 @@
-# Set the command-line arguments to pass to the server.
-ARGS=''
-
-# Usage of prometheus-bind-exporter:
-# -bind.pid-file string
-# Path to Bind's pid file to export process information.
-# -bind.stats-groups value
-# Comma-separated list of statistics to collect. Available: [server, view, tasks] (default "server,view")
-# -bind.stats-url string
-# HTTP XML API address of an Bind server. (default "http://localhost:8053/")
-# -bind.stats-version string
-# BIND statistics version. Can be detected automatically. Available: [xml.v2, xml.v3, auto] (default "auto")
-# -bind.timeout duration
-# Timeout for trying to get stats from Bind. (default 10s)
-# -log.format value
-# Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true" (default "logger:stderr")
-# -log.level value
-# Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal] (default "info")
-# -version
-# Print version information.
-# -web.listen-address string
-# Address to listen on for web interface and telemetry. (default ":9119")
-# -web.telemetry-path string
-# Path under which to expose metrics. (default "/metrics")
+ARGS="-web.listen-address ':9119' -bind.stats-url 'http://localhost:8053/'"
changed: [vm2]
--- before: /etc/default/prometheus-bind-exporter
+++ after: /Users/keisuke_konno/.ansible/tmp/ansible-local-47698zizhxs_8/tmpcu8owpfn/prometheus-bind-exporter.j2
@@ -1,24 +1 @@
-# Set the command-line arguments to pass to the server.
-ARGS=''
-
-# Usage of prometheus-bind-exporter:
-# -bind.pid-file string
-# Path to Bind's pid file to export process information.
-# -bind.stats-groups value
-# Comma-separated list of statistics to collect. Available: [server, view, tasks] (default "server,view")
-# -bind.stats-url string
-# HTTP XML API address of an Bind server. (default "http://localhost:8053/")
-# -bind.stats-version string
-# BIND statistics version. Can be detected automatically. Available: [xml.v2, xml.v3, auto] (default "auto")
-# -bind.timeout duration
-# Timeout for trying to get stats from Bind. (default 10s)
-# -log.format value
-# Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true" (default "logger:stderr")
-# -log.level value