From 8ca35d04309e04a3c40575c6f0cf130aa5be6b24 Mon Sep 17 00:00:00 2001 From: Eric Chang Date: Wed, 20 Mar 2019 22:00:01 +0800 Subject: [PATCH] hugo daily push 2019-03-20 22:00:01 --- content/post/command_to_test_main_ssl.md | 234 +++++++ public/404.html | 8 +- public/author/eric-chang/index.html | 186 ++---- public/author/eric-chang/index.xml | 15 +- public/author/eric-chang/page/2/index.html | 126 +++- public/author/index.html | 10 +- public/author/index.xml | 2 +- public/categories/index.html | 8 +- public/categories/ps/index.html | 8 +- public/categories/碎念/index.html | 8 +- public/categories/筆記/index.html | 8 +- public/categories/筆記/page/2/index.html | 8 +- public/categories/群暉/index.html | 8 +- public/en/sitemap.xml | 11 +- public/gallery/index.html | 8 +- public/gallery/sammy93/index.html | 8 +- public/index.html | 190 ++---- public/index.xml | 15 +- public/page/2/index.html | 128 +++- .../index.html | 8 +- .../post/ansible-selectattr-filter/index.html | 8 +- public/post/ansible-selectattr/index.html | 8 +- public/post/bookstack-docker/index.html | 8 +- .../index.html | 8 +- .../post/command_to_test_main_ssl/index.html | 587 ++++++++++++++++++ public/post/copy_role_in_pgsql/index.html | 8 +- .../index.html | 8 +- .../enable-synology-public-ssh/index.html | 8 +- .../incredibly-slow-mdadm-rebuild/index.html | 8 +- public/post/index.html | 186 ++---- public/post/index.xml | 15 +- .../index.html | 8 +- .../index.html | 8 +- .../post/nice-du-report-tool-durep/index.html | 8 +- public/post/page/2/index.html | 126 +++- .../index.html | 8 +- .../synology-ds415-repair-cost/index.html | 8 +- .../index.html | 8 +- .../weird-client-server-connection/index.html | 8 +- public/sitemap.xml | 2 +- public/tags/10g/index.html | 8 +- public/tags/ansible/index.html | 8 +- public/tags/backup/index.html | 8 +- public/tags/bookstack/index.html | 8 +- public/tags/docker/index.html | 8 +- public/tags/du/index.html | 8 +- public/tags/firefox/index.html | 8 +- public/tags/freenas/index.html | 8 +- public/tags/index.html | 8 +- public/tags/linux/index.html | 8 +- public/tags/mdadm/index.html | 8 +- public/tags/mellanox/index.html | 8 +- public/tags/metabase/index.html | 8 +- public/tags/nas/index.html | 8 +- public/tags/ps/index.html | 8 +- public/tags/psql/index.html | 8 +- public/tags/raid/index.html | 8 +- public/tags/ssh/index.html | 8 +- public/tags/synology/index.html | 8 +- public/tags/ubuntu/index.html | 8 +- public/tags/vim/index.html | 8 +- public/tags/短今/index.html | 8 +- public/tags/筆記/index.html | 8 +- public/tags/群暉/index.html | 8 +- 64 files changed, 1636 insertions(+), 589 deletions(-) create mode 100644 content/post/command_to_test_main_ssl.md create mode 100644 public/post/command_to_test_main_ssl/index.html diff --git a/content/post/command_to_test_main_ssl.md b/content/post/command_to_test_main_ssl.md new file mode 100644 index 00000000..520470ec --- /dev/null +++ b/content/post/command_to_test_main_ssl.md @@ -0,0 +1,234 @@ +--- +title: "[筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL" +date: 2019-03-20T11:42:47+08:00 +noSummary: false +featuredImage: "https://h.cowbay.org/images/post-default-10.jpg" +categories: [] +tags: [] +author: "Eric Chang" +--- + +今天老闆出國,發slack說手機不能寄信,看了一下,似乎是因為用GMAIL的APP來收信 + +然後google 不知道跟人家改了什麼,結果不接受原本的認證了... WTF .... + +然後,這問題應該很久了,結果現在才在講 .... + + + +底下都是用linux 主機來進行測試 + +windows環境應該也可以,只是要自己去安裝 openssl 軟體 + + +To verify SSL, connect to any Linux server via SSH and use the instructions below: + +**測試 SSL-IMAP 993 port** + +``` +openssl s_client -showcerts -connect mail.example.com:993 +``` + +結果應該會像是這樣 + +``` +2019-03-20 11:21:02 [changch@hqdc034 ~]$ openssl s_client -showcerts -connect mail.abc.com:993 +CONNECTED(00000003) +depth=0 C = TW, ST = Taipei, L = Taipei, O = iredmail02.abc.com, OU = IT, CN = iredmail02.abc.com, emailAddress = root@iredmail02.abc.com +verify error:num=18:self signed certificate +verify return:1 +depth=0 C = TW, ST = Taipei, L = Taipei, O = iredmail02.abc.com, OU = IT, CN = iredmail02.abc.com, emailAddress = root@iredmail02.abc.com +verify return:1 +--- +Certificate chain + 0 s:/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com + i:/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com +-----BEGIN CERTIFICATE----- +MIIEQTCCAymgAwIBAgIJAJksSxoDSMTLMA0GCSqGSIb3DQEBCwUAMIG2MQswCQYD +VQQGEwJUVzEPMA0GA1UECAwGVGFpcGVpMQ8wDQYDVQQHDAZUYWlwZWkxIzAhBgNV +BAoMGmlyZWRtYWlsMDIuZW1hdHRlcnMuY29tLnR3MQswCQYDVQQLDAJJVDEjMCEG +A1UEAwwaaXJlZG1haWwwMi5lbWF0dGVycy5jb20udHcxLjAsBgkqhkiG9w0BCQEW +H3Jvb3RAaXJlZG1haWwwMi5lbWF0dGVycy5jb20udHcwHhcNMTQwOTI0MTA1MjA2 +WhcNMjQwOTIxMTA1MjA2WjCBtjELMAkGA1UEBhMCVFcxDzANBgNVBAgMBlRhaXBl +aTEPMA0GA1UEBwwGVGFpcGVpMSMwIQYDVQQKDBppcmVkbWFpbDAyLmVtYXR0ZXJz +LmNvbS50dzELMAkGA1UECwwCSVQxIzAhBgNVBAMMGmlyZWRtYWlsMDIuZW1hdHRl +cnMuY29tLnR3MS4wLAYJKoZIhvcNAQkBFh9yb290QGlyZWRtYWlsMDIuZW1hdHRl +cnMuY29tLnR3MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvwNtZSdi +tDxSLNtFiIFv4Ww0+TwtuJAs6yUjQmfHa8CQDoSO/5EmUE2n4VA/78Qb/l/Si5tR +1FcTY2fifzXJfKkC5kMfoxkevyVqGCw3ZKku/QclaGunmLr/xCndbxbmx28T6PYJ +73ZrM9viRsE9Cn397IXZWOK+YFIxShhUFZrz1RxDk3cIU+MubBq7/A9Af8Izq9RK +w1vYK8+Jg81rOerQy71THxuUO5t+uFRzHuKGl8w8TnTt+Gnqx02UWFyHHtlVvhYV +Bi985OtvP0liApUQM7X4FPK/9cgNIlnXIi+SzQ2qtjqLNUHfO4P7GZ0IezIlFCHJ +ylx7GAj/tXm7HQIDAQABo1AwTjAdBgNVHQ4EFgQUgedf/rCzYD2FkR9C+kurh3Tj +2jcwHwYDVR0jBBgwFoAUgedf/rCzYD2FkR9C+kurh3Tj2jcwDAYDVR0TBAUwAwEB +/zANBgkqhkiG9w0BAQsFAAOCAQEAdFwoT/Y+76bDVxKn6ZW2hY0zcRe71MV4M6L1 +AaObMEEBFg3C4oDZJTEyLItT2YNQ8SyNue9GstTwoZeMBiJ+sTt82f4d3KuaPynO +3ArnEGEektuaOs449eLHqLZVyGgMl7LMjThLntlTfBqD6cnmrcRpGdMUffCVAL9o +xzT9cgS6nOQIDo4uTPi7V8hqo+ioBzQXernomETW8TYocezw+XoaZB0rx4oo7uj9 +zBih574GxNMcLreus5b8shEVWWlvReYkGjiHO70j818zOv4pmeJgNmkIEUW068TV +EybQFb6GZt3n3HWAbCc/ohaqUAoHc6S0P38xWRpLKyqvKEtjzw== +-----END CERTIFICATE----- +--- +Server certificate +subject=/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com +issuer=/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com +--- +No client certificate CA names sent +--- +SSL handshake has read 1784 bytes and written 453 bytes +--- +New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384 +Server public key is 2048 bit +Secure Renegotiation IS supported +Compression: NONE +Expansion: NONE +SSL-Session: + Protocol : TLSv1.2 + Cipher : ECDHE-RSA-AES256-GCM-SHA384 + Session-ID: 44738AF637D8531FE4554D30FC2D33428A17BD3B63C38C9D51EA18567D77F9F4 + Session-ID-ctx: + Master-Key: BEC2C876D0BE5066B7A1EC6BC06B8B72169FF6D6ADC77C45A080F6B7FCB23911134F815802BA80FC106C1E39F5FD28C3 + Key-Arg : None + PSK identity: None + PSK identity hint: None + SRP username: None + TLS session ticket lifetime hint: 300 (seconds) + TLS session ticket: + 0000 - 22 77 be c5 f2 e7 14 e1-b0 dc 1d 0b 00 a1 11 47 "w.............G + 0010 - a0 c5 b5 26 fb 15 b7 07-60 9a 79 8a a6 a5 45 77 ...&....`.y...Ew + 0020 - 74 de 1f 1e 8f b6 4d 29-66 6e 07 38 f3 d5 d8 35 t.....M)fn.8...5 + 0030 - 2a 83 36 56 6f d7 0e c6-19 95 60 c5 3f 3c 9b 25 *.6Vo.....`.?<.% + 0040 - 75 0e 2a b6 57 cf 74 ad-36 e8 60 ee 37 30 ca e9 u.*.W.t.6.`.70.. + 0050 - e1 42 b2 28 7e 03 df 1a-50 0c 31 ce d1 97 f2 84 .B.(~...P.1..... + 0060 - 2a 89 e1 c9 79 37 e1 37-9a f8 7f 8b 54 e0 ef 72 *...y7.7....T..r + 0070 - 4f 97 f1 92 24 b1 c5 9c-97 e1 03 cf 93 7b d8 e7 O...$........{.. + 0080 - 72 6e 3d 33 a2 84 ea c3-9f 26 7f ae 99 29 88 04 rn=3.....&...).. + 0090 - 20 86 63 d2 7d ef b1 da-46 6f 3b 3c 4d dc 39 f2 .c.}...Fo; +openssl s_client -showcerts -connect mail.example.com:465 + + +不過因為我沒開這個port ,所以就不測試了 + diff --git a/public/404.html b/public/404.html index a22fab3c..20ecbd4d 100644 --- a/public/404.html +++ b/public/404.html @@ -115,6 +115,10 @@ Latest posts diff --git a/public/author/eric-chang/index.html b/public/author/eric-chang/index.html index 7806d080..ea1987e9 100644 --- a/public/author/eric-chang/index.html +++ b/public/author/eric-chang/index.html @@ -90,6 +90,66 @@ +
+ + + + + + + + +
+
@@ -817,124 +877,6 @@ -
- - - - - - -
- - - - - -
- - - - -
-

[筆記] Ansible how to use 'list' in yaml file

-
- - - 2018-11-27 - - - - - - - - - 筆記 - - - - - - Eric Chang - -
- - -

這幾天在玩ansible 時,碰到一個問題

- -

假如我有個yaml檔作為資料來源,檔名是 abc.yml

- -

大概長這樣

- -
    "teams": [
-        {
-            "chinese_name": "TEAM1",
-            "description": "TEAM1",
-            "gid": 10125,
-            "location": [
-                "hq"
-            ],
-            "name": "aa",
-            "users": [
-                "chen",
-                "chou",
-                "huani",
-                "yey",
-                "wa"
-            ]
-        },
-        {
-            "chinese_name": "TEAM2",
-            "description": "TEAM2",
-            "gid": 10126,
-            "location": [
-                "hq"
-            ],
-            "name": "bb",
-            "users": [
-                "chhiao",
-                "chgc",
-                "chy",
-                "hsi",
-                "li",
-                "li",
-                "chgchi"
-            ]
-        }
-		]
-		
-
- -

- - - Continue reading - - -
- - -
@@ -965,6 +907,10 @@ Latest posts
diff --git a/public/author/eric-chang/index.xml b/public/author/eric-chang/index.xml index a9fe46e1..f554e2e5 100644 --- a/public/author/eric-chang/index.xml +++ b/public/author/eric-chang/index.xml @@ -5,11 +5,24 @@ https://h.cowbay.org/author/eric-chang/ Recent content in Eric Chang on MC部落 Hugo -- gohugo.io - Mon, 11 Mar 2019 14:02:30 +0800 + Wed, 20 Mar 2019 11:42:47 +0800 + + [筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL + https://h.cowbay.org/post/command_to_test_main_ssl/ + Wed, 20 Mar 2019 11:42:47 +0800 + + https://h.cowbay.org/post/command_to_test_main_ssl/ + <p>今天老闆出國,發slack說手機不能寄信,看了一下,似乎是因為用GMAIL的APP來收信</p> + +<p>然後google 不知道跟人家改了什麼,結果不接受原本的認證了&hellip; WTF &hellip;.</p> + +<p>然後,這問題應該很久了,結果現在才在講 &hellip;.</p> + + Install Timeshift on Ubuntu1804 https://h.cowbay.org/post/install-timeshift-on-ubuntu1804/ diff --git a/public/author/eric-chang/page/2/index.html b/public/author/eric-chang/page/2/index.html index 87d24e10..46957cfe 100644 --- a/public/author/eric-chang/page/2/index.html +++ b/public/author/eric-chang/page/2/index.html @@ -90,6 +90,124 @@ +
+ + + + + +
+ + + + +
+

[筆記] Ansible how to use 'list' in yaml file

+
+ + + 2018-11-27 + + + + + + + + + 筆記 + + + + + + Eric Chang + +
+ + +

這幾天在玩ansible 時,碰到一個問題

+ +

假如我有個yaml檔作為資料來源,檔名是 abc.yml

+ +

大概長這樣

+ +
    "teams": [
+        {
+            "chinese_name": "TEAM1",
+            "description": "TEAM1",
+            "gid": 10125,
+            "location": [
+                "hq"
+            ],
+            "name": "aa",
+            "users": [
+                "chen",
+                "chou",
+                "huani",
+                "yey",
+                "wa"
+            ]
+        },
+        {
+            "chinese_name": "TEAM2",
+            "description": "TEAM2",
+            "gid": 10126,
+            "location": [
+                "hq"
+            ],
+            "name": "bb",
+            "users": [
+                "chhiao",
+                "chgc",
+                "chy",
+                "hsi",
+                "li",
+                "li",
+                "chgchi"
+            ]
+        }
+		]
+		
+
+ +

+ + + Continue reading + + +
+ + + + +
+ + +
+
@@ -693,6 +811,10 @@ Latest posts
diff --git a/public/author/index.html b/public/author/index.html index a17d73ca..d6306b56 100644 --- a/public/author/index.html +++ b/public/author/index.html @@ -101,7 +101,7 @@
@@ -120,6 +120,10 @@ Latest posts diff --git a/public/author/index.xml b/public/author/index.xml index d9f30ccd..f7ab9e30 100644 --- a/public/author/index.xml +++ b/public/author/index.xml @@ -12,7 +12,7 @@ Eric Chang https://h.cowbay.org/author/eric-chang/ - Mon, 11 Mar 2019 14:02:30 +0800 + Wed, 20 Mar 2019 11:42:47 +0800 https://h.cowbay.org/author/eric-chang/ diff --git a/public/categories/index.html b/public/categories/index.html index cc6a046c..1390d277 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -126,6 +126,10 @@ Latest posts diff --git a/public/categories/ps/index.html b/public/categories/ps/index.html index 89bd9a6b..60ff227b 100644 --- a/public/categories/ps/index.html +++ b/public/categories/ps/index.html @@ -179,6 +179,10 @@ Latest posts diff --git a/public/categories/碎念/index.html b/public/categories/碎念/index.html index 37b776a1..34eadbb9 100644 --- a/public/categories/碎念/index.html +++ b/public/categories/碎念/index.html @@ -192,6 +192,10 @@ Latest posts diff --git a/public/categories/筆記/index.html b/public/categories/筆記/index.html index 8bb661fd..2e89925f 100644 --- a/public/categories/筆記/index.html +++ b/public/categories/筆記/index.html @@ -957,6 +957,10 @@ Latest posts diff --git a/public/categories/筆記/page/2/index.html b/public/categories/筆記/page/2/index.html index 5ad3064b..e1fdd7af 100644 --- a/public/categories/筆記/page/2/index.html +++ b/public/categories/筆記/page/2/index.html @@ -461,6 +461,10 @@ Latest posts diff --git a/public/categories/群暉/index.html b/public/categories/群暉/index.html index 54a1c512..b1fc2a61 100644 --- a/public/categories/群暉/index.html +++ b/public/categories/群暉/index.html @@ -202,6 +202,10 @@ Latest posts diff --git a/public/en/sitemap.xml b/public/en/sitemap.xml index 712db30a..455b2919 100644 --- a/public/en/sitemap.xml +++ b/public/en/sitemap.xml @@ -2,6 +2,11 @@ + + https://h.cowbay.org/post/command_to_test_main_ssl/ + 2019-03-20T11:42:47+08:00 + + https://h.cowbay.org/post/install-timeshift-on-ubuntu1804/ 2019-03-11T14:02:30+08:00 @@ -155,7 +160,7 @@ https://h.cowbay.org/author/eric-chang/ - 2019-03-11T14:02:30+08:00 + 2019-03-20T11:42:47+08:00 0 @@ -185,7 +190,7 @@ https://h.cowbay.org/ - 2019-03-11T14:02:30+08:00 + 2019-03-20T11:42:47+08:00 0 https://h.cowbay.org/post/ - 2019-03-11T14:02:30+08:00 + 2019-03-20T11:42:47+08:00 0 diff --git a/public/gallery/index.html b/public/gallery/index.html index 9af67d6e..ac1fcac4 100644 --- a/public/gallery/index.html +++ b/public/gallery/index.html @@ -179,6 +179,10 @@ Latest posts diff --git a/public/gallery/sammy93/index.html b/public/gallery/sammy93/index.html index 36dd1d13..37088b18 100644 --- a/public/gallery/sammy93/index.html +++ b/public/gallery/sammy93/index.html @@ -191,6 +191,10 @@ Latest posts diff --git a/public/index.html b/public/index.html index 715686b3..ed23b0ba 100644 --- a/public/index.html +++ b/public/index.html @@ -95,6 +95,68 @@ +
+ + + + + + + + +
+ + +
@@ -838,126 +900,6 @@ -
- - - - - - - - -
- - - - - -
- - - - -
-

[筆記] Ansible how to use 'list' in yaml file

-
- - - 2018-11-27 - - - - - - - - - 筆記 - - - - - - Eric Chang - -
- - -

這幾天在玩ansible 時,碰到一個問題

- -

假如我有個yaml檔作為資料來源,檔名是 abc.yml

- -

大概長這樣

- -
    "teams": [
-        {
-            "chinese_name": "TEAM1",
-            "description": "TEAM1",
-            "gid": 10125,
-            "location": [
-                "hq"
-            ],
-            "name": "aa",
-            "users": [
-                "chen",
-                "chou",
-                "huani",
-                "yey",
-                "wa"
-            ]
-        },
-        {
-            "chinese_name": "TEAM2",
-            "description": "TEAM2",
-            "gid": 10126,
-            "location": [
-                "hq"
-            ],
-            "name": "bb",
-            "users": [
-                "chhiao",
-                "chgc",
-                "chy",
-                "hsi",
-                "li",
-                "li",
-                "chgchi"
-            ]
-        }
-		]
-		
-
- -

- - - Continue reading - - -
- - -
@@ -989,6 +931,10 @@ Latest posts
diff --git a/public/index.xml b/public/index.xml index f92f41af..f9b675d9 100644 --- a/public/index.xml +++ b/public/index.xml @@ -5,11 +5,24 @@ https://h.cowbay.org/ Recent content on MC部落 Hugo -- gohugo.io - Mon, 11 Mar 2019 14:02:30 +0800 + Wed, 20 Mar 2019 11:42:47 +0800 + + [筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL + https://h.cowbay.org/post/command_to_test_main_ssl/ + Wed, 20 Mar 2019 11:42:47 +0800 + + https://h.cowbay.org/post/command_to_test_main_ssl/ + <p>今天老闆出國,發slack說手機不能寄信,看了一下,似乎是因為用GMAIL的APP來收信</p> + +<p>然後google 不知道跟人家改了什麼,結果不接受原本的認證了&hellip; WTF &hellip;.</p> + +<p>然後,這問題應該很久了,結果現在才在講 &hellip;.</p> + + Install Timeshift on Ubuntu1804 https://h.cowbay.org/post/install-timeshift-on-ubuntu1804/ diff --git a/public/page/2/index.html b/public/page/2/index.html index 2847d26c..8fe159a6 100644 --- a/public/page/2/index.html +++ b/public/page/2/index.html @@ -95,6 +95,126 @@ +
+ + + + + +
+ + + + +
+

[筆記] Ansible how to use 'list' in yaml file

+
+ + + 2018-11-27 + + + + + + + + + 筆記 + + + + + + Eric Chang + +
+ + +

這幾天在玩ansible 時,碰到一個問題

+ +

假如我有個yaml檔作為資料來源,檔名是 abc.yml

+ +

大概長這樣

+ +
    "teams": [
+        {
+            "chinese_name": "TEAM1",
+            "description": "TEAM1",
+            "gid": 10125,
+            "location": [
+                "hq"
+            ],
+            "name": "aa",
+            "users": [
+                "chen",
+                "chou",
+                "huani",
+                "yey",
+                "wa"
+            ]
+        },
+        {
+            "chinese_name": "TEAM2",
+            "description": "TEAM2",
+            "gid": 10126,
+            "location": [
+                "hq"
+            ],
+            "name": "bb",
+            "users": [
+                "chhiao",
+                "chgc",
+                "chy",
+                "hsi",
+                "li",
+                "li",
+                "chgchi"
+            ]
+        }
+		]
+		
+
+ +

+ + + Continue reading + + +
+ + + + +
+ + +
+ + +
@@ -711,6 +831,10 @@ Latest posts
diff --git a/public/post/10g-lab-using-proxmox-and-mellanox/index.html b/public/post/10g-lab-using-proxmox-and-mellanox/index.html index 53a86988..0717a79f 100644 --- a/public/post/10g-lab-using-proxmox-and-mellanox/index.html +++ b/public/post/10g-lab-using-proxmox-and-mellanox/index.html @@ -415,6 +415,10 @@ TCP window size: 85.0 KByte (default) Latest posts diff --git a/public/post/ansible-selectattr-filter/index.html b/public/post/ansible-selectattr-filter/index.html index 7e37aabf..e4c551d2 100644 --- a/public/post/ansible-selectattr-filter/index.html +++ b/public/post/ansible-selectattr-filter/index.html @@ -218,6 +218,10 @@ Latest posts diff --git a/public/post/ansible-selectattr/index.html b/public/post/ansible-selectattr/index.html index 0d15a207..dfc7c4db 100644 --- a/public/post/ansible-selectattr/index.html +++ b/public/post/ansible-selectattr/index.html @@ -329,6 +329,10 @@ Latest posts diff --git a/public/post/bookstack-docker/index.html b/public/post/bookstack-docker/index.html index 260e1f64..bb913edd 100644 --- a/public/post/bookstack-docker/index.html +++ b/public/post/bookstack-docker/index.html @@ -284,6 +284,10 @@ b8d74048eba1 mysql:5.7.21 "docker-entrypoint.s…&qu Latest posts diff --git a/public/post/change-preferred-language-in-firefox/index.html b/public/post/change-preferred-language-in-firefox/index.html index cccd7c4c..6682c9ac 100644 --- a/public/post/change-preferred-language-in-firefox/index.html +++ b/public/post/change-preferred-language-in-firefox/index.html @@ -258,6 +258,10 @@ Latest posts diff --git a/public/post/command_to_test_main_ssl/index.html b/public/post/command_to_test_main_ssl/index.html new file mode 100644 index 00000000..0f08dcaf --- /dev/null +++ b/public/post/command_to_test_main_ssl/index.html @@ -0,0 +1,587 @@ + + + + + + + + + + [筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL | MC部落 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+

MC部落

+ + 這是MC的HUGO部落格,採用bilberry theme + +
+ + + + +
+ + +
+
+
+ + +
+ + +
+ + + + + +
+ + + + +
+

[筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL

+
+ + + 2019-03-20 + + + + + + + + + Eric Chang + +
+ + +

今天老闆出國,發slack說手機不能寄信,看了一下,似乎是因為用GMAIL的APP來收信

+ +

然後google 不知道跟人家改了什麼,結果不接受原本的認證了… WTF ….

+ +

然後,這問題應該很久了,結果現在才在講 ….

+ +

+底下都是用linux 主機來進行測試

+ +

windows環境應該也可以,只是要自己去安裝 openssl 軟體

+ +

To verify SSL, connect to any Linux server via SSH and use the instructions below:

+ +

測試 SSL-IMAP 993 port

+ +
openssl s_client -showcerts -connect mail.example.com:993
+
+ +

結果應該會像是這樣

+ +
2019-03-20 11:21:02 [changch@hqdc034 ~]$ openssl s_client -showcerts -connect mail.abc.com:993
+CONNECTED(00000003)
+depth=0 C = TW, ST = Taipei, L = Taipei, O = iredmail02.abc.com, OU = IT, CN = iredmail02.abc.com, emailAddress = root@iredmail02.abc.com
+verify error:num=18:self signed certificate
+verify return:1
+depth=0 C = TW, ST = Taipei, L = Taipei, O = iredmail02.abc.com, OU = IT, CN = iredmail02.abc.com, emailAddress = root@iredmail02.abc.com
+verify return:1
+---
+Certificate chain
+ 0 s:/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com
+   i:/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com
+-----BEGIN CERTIFICATE-----
+MIIEQTCCAymgAwIBAgIJAJksSxoDSMTLMA0GCSqGSIb3DQEBCwUAMIG2MQswCQYD
+VQQGEwJUVzEPMA0GA1UECAwGVGFpcGVpMQ8wDQYDVQQHDAZUYWlwZWkxIzAhBgNV
+BAoMGmlyZWRtYWlsMDIuZW1hdHRlcnMuY29tLnR3MQswCQYDVQQLDAJJVDEjMCEG
+A1UEAwwaaXJlZG1haWwwMi5lbWF0dGVycy5jb20udHcxLjAsBgkqhkiG9w0BCQEW
+H3Jvb3RAaXJlZG1haWwwMi5lbWF0dGVycy5jb20udHcwHhcNMTQwOTI0MTA1MjA2
+WhcNMjQwOTIxMTA1MjA2WjCBtjELMAkGA1UEBhMCVFcxDzANBgNVBAgMBlRhaXBl
+aTEPMA0GA1UEBwwGVGFpcGVpMSMwIQYDVQQKDBppcmVkbWFpbDAyLmVtYXR0ZXJz
+LmNvbS50dzELMAkGA1UECwwCSVQxIzAhBgNVBAMMGmlyZWRtYWlsMDIuZW1hdHRl
+cnMuY29tLnR3MS4wLAYJKoZIhvcNAQkBFh9yb290QGlyZWRtYWlsMDIuZW1hdHRl
+cnMuY29tLnR3MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvwNtZSdi
+tDxSLNtFiIFv4Ww0+TwtuJAs6yUjQmfHa8CQDoSO/5EmUE2n4VA/78Qb/l/Si5tR
+1FcTY2fifzXJfKkC5kMfoxkevyVqGCw3ZKku/QclaGunmLr/xCndbxbmx28T6PYJ
+73ZrM9viRsE9Cn397IXZWOK+YFIxShhUFZrz1RxDk3cIU+MubBq7/A9Af8Izq9RK
+w1vYK8+Jg81rOerQy71THxuUO5t+uFRzHuKGl8w8TnTt+Gnqx02UWFyHHtlVvhYV
+Bi985OtvP0liApUQM7X4FPK/9cgNIlnXIi+SzQ2qtjqLNUHfO4P7GZ0IezIlFCHJ
+ylx7GAj/tXm7HQIDAQABo1AwTjAdBgNVHQ4EFgQUgedf/rCzYD2FkR9C+kurh3Tj
+2jcwHwYDVR0jBBgwFoAUgedf/rCzYD2FkR9C+kurh3Tj2jcwDAYDVR0TBAUwAwEB
+/zANBgkqhkiG9w0BAQsFAAOCAQEAdFwoT/Y+76bDVxKn6ZW2hY0zcRe71MV4M6L1
+AaObMEEBFg3C4oDZJTEyLItT2YNQ8SyNue9GstTwoZeMBiJ+sTt82f4d3KuaPynO
+3ArnEGEektuaOs449eLHqLZVyGgMl7LMjThLntlTfBqD6cnmrcRpGdMUffCVAL9o
+xzT9cgS6nOQIDo4uTPi7V8hqo+ioBzQXernomETW8TYocezw+XoaZB0rx4oo7uj9
+zBih574GxNMcLreus5b8shEVWWlvReYkGjiHO70j818zOv4pmeJgNmkIEUW068TV
+EybQFb6GZt3n3HWAbCc/ohaqUAoHc6S0P38xWRpLKyqvKEtjzw==
+-----END CERTIFICATE-----
+---
+Server certificate
+subject=/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com
+issuer=/C=TW/ST=Taipei/L=Taipei/O=iredmail02.abc.com/OU=IT/CN=iredmail02.abc.com/emailAddress=root@iredmail02.abc.com
+---
+No client certificate CA names sent
+---
+SSL handshake has read 1784 bytes and written 453 bytes
+---
+New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
+Server public key is 2048 bit
+Secure Renegotiation IS supported
+Compression: NONE
+Expansion: NONE
+SSL-Session:
+    Protocol  : TLSv1.2
+    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
+    Session-ID: 44738AF637D8531FE4554D30FC2D33428A17BD3B63C38C9D51EA18567D77F9F4
+    Session-ID-ctx: 
+    Master-Key: BEC2C876D0BE5066B7A1EC6BC06B8B72169FF6D6ADC77C45A080F6B7FCB23911134F815802BA80FC106C1E39F5FD28C3
+    Key-Arg   : None
+    PSK identity: None
+    PSK identity hint: None
+    SRP username: None
+    TLS session ticket lifetime hint: 300 (seconds)
+    TLS session ticket:
+    0000 - 22 77 be c5 f2 e7 14 e1-b0 dc 1d 0b 00 a1 11 47   "w.............G
+    0010 - a0 c5 b5 26 fb 15 b7 07-60 9a 79 8a a6 a5 45 77   ...&....`.y...Ew
+    0020 - 74 de 1f 1e 8f b6 4d 29-66 6e 07 38 f3 d5 d8 35   t.....M)fn.8...5
+    0030 - 2a 83 36 56 6f d7 0e c6-19 95 60 c5 3f 3c 9b 25   *.6Vo.....`.?<.%
+    0040 - 75 0e 2a b6 57 cf 74 ad-36 e8 60 ee 37 30 ca e9   u.*.W.t.6.`.70..
+    0050 - e1 42 b2 28 7e 03 df 1a-50 0c 31 ce d1 97 f2 84   .B.(~...P.1.....
+    0060 - 2a 89 e1 c9 79 37 e1 37-9a f8 7f 8b 54 e0 ef 72   *...y7.7....T..r
+    0070 - 4f 97 f1 92 24 b1 c5 9c-97 e1 03 cf 93 7b d8 e7   O...$........{..
+    0080 - 72 6e 3d 33 a2 84 ea c3-9f 26 7f ae 99 29 88 04   rn=3.....&...)..
+    0090 - 20 86 63 d2 7d ef b1 da-46 6f 3b 3c 4d dc 39 f2    .c.}...Fo;<M.9.
+
+    Start Time: 1553052073
+    Timeout   : 300 (sec)
+    Verify return code: 18 (self signed certificate)
+---
+* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
+
+2019-03-20 11:21:47 [changch@hqdc034 ~]$ 
+
+ +

測試SMTP TLS 587 port

+ +
openssl s_client -starttls smtp -showcerts -connect mail.example.com:587
+
+ +

指令有點不同,要加上 startls smtp 的參數 +回應應該會是這樣

+ +
2019-03-20 11:50:48 [changch@hqdc034 ~]$ openssl s_client -starttls smtp -showcerts -connect mail.abc.com:587
+CONNECTED(00000003)
+depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
+verify error:num=20:unable to get local issuer certificate
+verify return:0
+---
+Certificate chain
+ 0 s:/CN=mail.abc.com
+   i:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
+-----BEGIN CERTIFICATE-----
+MIIFXjCCBEagAwIBAgISA1Tg+poqmT+Vztc+/L2IPUHiMA0GCSqGSIb3DQEBCwUA
+MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
+ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTAyMjAyMzM0MjZaFw0x
+OTA1MjEyMzM0MjZaMB8xHTAbBgNVBAMTFG1haWwuZW1hdHRlcnMuY29tLnR3MIIB
+IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuhyXC0sCNccrqteycHst8ykZ
+JSLxXB/07GBkvpdaCSKqTFAjtUh9IpkyDna1+IMtQIX+jeDWvd/GMJ3lj1pCgM+X
+je850oFBp+HxMXTSDN67RMPbZsgAt9I938uigYmICHCqn4+FrnlfEOuX24326Y5Z
+qEnguvZIdXYbQ5fzdMjP4W4Byu9cQAR+IUEWpFZ+hFNETAOVlNFb5kzsESWPTwIk
+XWpDeQLQN6Iixf/ISXduJZSbOsFknAk7Dfrfine2cN9uYFCaiI2MJzrZ472Gbx+d
+RnR6OmCinJ6Pb4yFQl2wQfGxnNyVCKTGu8JC+DM+j/Jfg1YYkxF4r/RdepPOTQID
+AQABo4ICZzCCAmMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB
+BggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSaA9/Ki7j6XwUFm5af
+X4WYJQNFIDAfBgNVHSMEGDAWgBSoSmpjBH3duubRObemRWXv86jsoTBvBggrBgEF
+BQcBAQRjMGEwLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3NwLmludC14My5sZXRzZW5j
+cnlwdC5vcmcwLwYIKwYBBQUHMAKGI2h0dHA6Ly9jZXJ0LmludC14My5sZXRzZW5j
+cnlwdC5vcmcvMB8GA1UdEQQYMBaCFG1haWwuZW1hdHRlcnMuY29tLnR3MEwGA1Ud
+IARFMEMwCAYGZ4EMAQIBMDcGCysGAQQBgt8TAQEBMCgwJgYIKwYBBQUHAgEWGmh0
+dHA6Ly9jcHMubGV0c2VuY3J5cHQub3JnMIIBAgYKKwYBBAHWeQIEAgSB8wSB8ADu
+AHUA4mlLribo6UAJ6IYbtjuD1D7n/nSI+6SPKJMBnd3x2/4AAAFpDXmYTAAABAMA
+RjBEAiBwIf9s7zBBuh/HUso4GWcZcAaEp2LsqT3xuJNOt7EWDAIgXE+u1JRVVEit
+vi0PWIyfmUhBV8HP9GZ7r7uv2/9vGoYAdQBj8tvN6DvMLM8LcoQnV2szpI1hd4+9
+daY4scdoVEvYjQAAAWkNeZiVAAAEAwBGMEQCIAZHUtzIl+6UvusG0cpYTiN5cFav
+hzFQMoGeA5L5bSRvAiARX/+xnhtF9lUcXOsJfST1Eghk4Gm7QGno8vbcD3JHnzAN
+BgkqhkiG9w0BAQsFAAOCAQEAI3buq7vydxeDpwSYVToAockocOMwXTyORIo6tACg
+Z8gmVVTU6jliwrGWGzsjGh/V0gU+beDtlKzJpsYqbAWGOne1uuuKoH++lHO1KrrB
+Br0R+G/UlIhRIZuSCdUGylWkV1ZQbHPtfw3MBB4nNj6wU0/tluxrqHJme/tyRSCs
+WiP/DSfzIUkGUSSXyd3oEjwBdmq7NAmck3FK24HgBcJ3PSExChw4+TsEmGicpCKP
+Q5AKt+n4b52tnp51P7rBHSFdmNL4AZiiQtZNXVmAQ2GI9zCwKguQg2c3YJ2oF39m
+1GnjpLMRQkv5x6GQi7rglwB9ROH92Lg+uSD1vzjfiFwQeQ==
+-----END CERTIFICATE-----
+ 1 s:/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
+   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
+-----BEGIN CERTIFICATE-----
+MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/
+MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
+DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow
+SjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxIzAhBgNVBAMT
+GkxldCdzIEVuY3J5cHQgQXV0aG9yaXR5IFgzMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAnNMM8FrlLke3cl03g7NoYzDq1zUmGSXhvb418XCSL7e4S0EF
+q6meNQhY7LEqxGiHC6PjdeTm86dicbp5gWAf15Gan/PQeGdxyGkOlZHP/uaZ6WA8
+SMx+yk13EiSdRxta67nsHjcAHJyse6cF6s5K671B5TaYucv9bTyWaN8jKkKQDIZ0
+Z8h/pZq4UmEUEz9l6YKHy9v6Dlb2honzhT+Xhq+w3Brvaw2VFn3EK6BlspkENnWA
+a6xK8xuQSXgvopZPKiAlKQTGdMDQMc2PMTiVFrqoM7hD8bEfwzB/onkxEz0tNvjj
+/PIzark5McWvxI0NHWQWM6r6hCm21AvA2H3DkwIDAQABo4IBfTCCAXkwEgYDVR0T
+AQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAYYwfwYIKwYBBQUHAQEEczBxMDIG
+CCsGAQUFBzABhiZodHRwOi8vaXNyZy50cnVzdGlkLm9jc3AuaWRlbnRydXN0LmNv
+bTA7BggrBgEFBQcwAoYvaHR0cDovL2FwcHMuaWRlbnRydXN0LmNvbS9yb290cy9k
+c3Ryb290Y2F4My5wN2MwHwYDVR0jBBgwFoAUxKexpHsscfrb4UuQdf/EFWCFiRAw
+VAYDVR0gBE0wSzAIBgZngQwBAgEwPwYLKwYBBAGC3xMBAQEwMDAuBggrBgEFBQcC
+ARYiaHR0cDovL2Nwcy5yb290LXgxLmxldHNlbmNyeXB0Lm9yZzA8BgNVHR8ENTAz
+MDGgL6AthitodHRwOi8vY3JsLmlkZW50cnVzdC5jb20vRFNUUk9PVENBWDNDUkwu
+Y3JsMB0GA1UdDgQWBBSoSmpjBH3duubRObemRWXv86jsoTANBgkqhkiG9w0BAQsF
+AAOCAQEA3TPXEfNjWDjdGBX7CVW+dla5cEilaUcne8IkCJLxWh9KEik3JHRRHGJo
+uM2VcGfl96S8TihRzZvoroed6ti6WqEBmtzw3Wodatg+VyOeph4EYpr/1wXKtx8/
+wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu
+X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG
+PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6
+KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==
+-----END CERTIFICATE-----
+---
+Server certificate
+subject=/CN=mail.abc.com
+issuer=/C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3
+---
+No client certificate CA names sent
+---
+SSL handshake has read 3279 bytes and written 456 bytes
+---
+New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES256-GCM-SHA384
+Server public key is 2048 bit
+Secure Renegotiation IS supported
+Compression: NONE
+Expansion: NONE
+SSL-Session:
+    Protocol  : TLSv1.2
+    Cipher    : ECDHE-RSA-AES256-GCM-SHA384
+    Session-ID: F9FF6D75A3923A3B4E2CFBECC3DEAE2402FA99DA2B0746B6A2BF7E7E49F2E4D6
+    Session-ID-ctx: 
+    Master-Key: 62D845C4754634DCDAE1AB544B06929504C6310B3CD6E4512E3718535D871F1115A78DB46FA608159F52169DE4D9E12F
+    Key-Arg   : None
+    PSK identity: None
+    PSK identity hint: None
+    SRP username: None
+    Start Time: 1553053873
+    Timeout   : 300 (sec)
+    Verify return code: 20 (unable to get local issuer certificate)
+---
+250 DSN
+
+
+ +

測試 SMTP SSL port 465 +指令 +

+openssl s_client -showcerts -connect mail.example.com:465
+

+ +

不過因為我沒開這個port ,所以就不測試了

+ +
+ + + + +
+ + +
+ + +
+ + +comments powered by Disqus + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/post/copy_role_in_pgsql/index.html b/public/post/copy_role_in_pgsql/index.html index 77607b1a..d76a6a96 100644 --- a/public/post/copy_role_in_pgsql/index.html +++ b/public/post/copy_role_in_pgsql/index.html @@ -216,6 +216,10 @@ GRANT a TO b; Latest posts diff --git a/public/post/create-portable-vim-environment/index.html b/public/post/create-portable-vim-environment/index.html index 326fbfb2..099183b0 100644 --- a/public/post/create-portable-vim-environment/index.html +++ b/public/post/create-portable-vim-environment/index.html @@ -229,6 +229,10 @@ Latest posts diff --git a/public/post/enable-synology-public-ssh/index.html b/public/post/enable-synology-public-ssh/index.html index d24bd181..3a7ef497 100644 --- a/public/post/enable-synology-public-ssh/index.html +++ b/public/post/enable-synology-public-ssh/index.html @@ -302,6 +302,10 @@ admin@storage:~$ Latest posts diff --git a/public/post/incredibly-slow-mdadm-rebuild/index.html b/public/post/incredibly-slow-mdadm-rebuild/index.html index fbe25a36..bd7438f8 100644 --- a/public/post/incredibly-slow-mdadm-rebuild/index.html +++ b/public/post/incredibly-slow-mdadm-rebuild/index.html @@ -272,6 +272,10 @@ unused devices: <none> Latest posts diff --git a/public/post/index.html b/public/post/index.html index a8052154..90911dcd 100644 --- a/public/post/index.html +++ b/public/post/index.html @@ -90,6 +90,66 @@ +
+ + + + + + + + +
+
@@ -817,124 +877,6 @@ -
- - - - - - -
- - - - - -
- - - - -
-

[筆記] Ansible how to use 'list' in yaml file

-
- - - 2018-11-27 - - - - - - - - - 筆記 - - - - - - Eric Chang - -
- - -

這幾天在玩ansible 時,碰到一個問題

- -

假如我有個yaml檔作為資料來源,檔名是 abc.yml

- -

大概長這樣

- -
    "teams": [
-        {
-            "chinese_name": "TEAM1",
-            "description": "TEAM1",
-            "gid": 10125,
-            "location": [
-                "hq"
-            ],
-            "name": "aa",
-            "users": [
-                "chen",
-                "chou",
-                "huani",
-                "yey",
-                "wa"
-            ]
-        },
-        {
-            "chinese_name": "TEAM2",
-            "description": "TEAM2",
-            "gid": 10126,
-            "location": [
-                "hq"
-            ],
-            "name": "bb",
-            "users": [
-                "chhiao",
-                "chgc",
-                "chy",
-                "hsi",
-                "li",
-                "li",
-                "chgchi"
-            ]
-        }
-		]
-		
-
- -

- - - Continue reading - - -
- - -
@@ -965,6 +907,10 @@ Latest posts
diff --git a/public/post/index.xml b/public/post/index.xml index 6fec148a..041b5554 100644 --- a/public/post/index.xml +++ b/public/post/index.xml @@ -5,11 +5,24 @@ https://h.cowbay.org/post/ Recent content in Posts on MC部落 Hugo -- gohugo.io - Mon, 11 Mar 2019 14:02:30 +0800 + Wed, 20 Mar 2019 11:42:47 +0800 + + [筆記] 測試mail server 的SSL憑證的指令 Command to test mailserver SSL + https://h.cowbay.org/post/command_to_test_main_ssl/ + Wed, 20 Mar 2019 11:42:47 +0800 + + https://h.cowbay.org/post/command_to_test_main_ssl/ + <p>今天老闆出國,發slack說手機不能寄信,看了一下,似乎是因為用GMAIL的APP來收信</p> + +<p>然後google 不知道跟人家改了什麼,結果不接受原本的認證了&hellip; WTF &hellip;.</p> + +<p>然後,這問題應該很久了,結果現在才在講 &hellip;.</p> + + Install Timeshift on Ubuntu1804 https://h.cowbay.org/post/install-timeshift-on-ubuntu1804/ diff --git a/public/post/install-timeshift-on-ubuntu1804/index.html b/public/post/install-timeshift-on-ubuntu1804/index.html index a0a9b940..65504804 100644 --- a/public/post/install-timeshift-on-ubuntu1804/index.html +++ b/public/post/install-timeshift-on-ubuntu1804/index.html @@ -774,6 +774,10 @@ sudo apt install joe-jupp Latest posts diff --git a/public/post/install-ubuntu1804-on-dell-6ir-raid-controller/index.html b/public/post/install-ubuntu1804-on-dell-6ir-raid-controller/index.html index 7931fd08..34ee1d3a 100644 --- a/public/post/install-ubuntu1804-on-dell-6ir-raid-controller/index.html +++ b/public/post/install-ubuntu1804-on-dell-6ir-raid-controller/index.html @@ -234,6 +234,10 @@ GRUB_CMDLINE_LINUX="rootdelay=90" Latest posts diff --git a/public/post/nice-du-report-tool-durep/index.html b/public/post/nice-du-report-tool-durep/index.html index 49bf933b..f79d9a41 100644 --- a/public/post/nice-du-report-tool-durep/index.html +++ b/public/post/nice-du-report-tool-durep/index.html @@ -251,6 +251,10 @@ Latest posts diff --git a/public/post/page/2/index.html b/public/post/page/2/index.html index 2e0548b3..5e498e06 100644 --- a/public/post/page/2/index.html +++ b/public/post/page/2/index.html @@ -90,6 +90,124 @@ +
+ + + + + +
+ + + + +
+

[筆記] Ansible how to use 'list' in yaml file

+
+ + + 2018-11-27 + + + + + + + + + 筆記 + + + + + + Eric Chang + +
+ + +

這幾天在玩ansible 時,碰到一個問題

+ +

假如我有個yaml檔作為資料來源,檔名是 abc.yml

+ +

大概長這樣

+ +
    "teams": [
+        {
+            "chinese_name": "TEAM1",
+            "description": "TEAM1",
+            "gid": 10125,
+            "location": [
+                "hq"
+            ],
+            "name": "aa",
+            "users": [
+                "chen",
+                "chou",
+                "huani",
+                "yey",
+                "wa"
+            ]
+        },
+        {
+            "chinese_name": "TEAM2",
+            "description": "TEAM2",
+            "gid": 10126,
+            "location": [
+                "hq"
+            ],
+            "name": "bb",
+            "users": [
+                "chhiao",
+                "chgc",
+                "chy",
+                "hsi",
+                "li",
+                "li",
+                "chgchi"
+            ]
+        }
+		]
+		
+
+ +

+ + + Continue reading + + +
+ + + + +
+ + +
+
@@ -625,6 +743,10 @@ Latest posts
diff --git a/public/post/smartd-failed-to-start-in-freenas/index.html b/public/post/smartd-failed-to-start-in-freenas/index.html index fc8526ee..36e6242f 100644 --- a/public/post/smartd-failed-to-start-in-freenas/index.html +++ b/public/post/smartd-failed-to-start-in-freenas/index.html @@ -214,6 +214,10 @@ Latest posts diff --git a/public/post/synology-ds415-repair-cost/index.html b/public/post/synology-ds415-repair-cost/index.html index 5d3ad9a0..dbd78621 100644 --- a/public/post/synology-ds415-repair-cost/index.html +++ b/public/post/synology-ds415-repair-cost/index.html @@ -264,6 +264,10 @@ Latest posts diff --git a/public/post/ubuntu-1804-install-root-on-raid/index.html b/public/post/ubuntu-1804-install-root-on-raid/index.html index fce9833a..f9eaf37f 100644 --- a/public/post/ubuntu-1804-install-root-on-raid/index.html +++ b/public/post/ubuntu-1804-install-root-on-raid/index.html @@ -326,6 +326,10 @@ Latest posts diff --git a/public/post/weird-client-server-connection/index.html b/public/post/weird-client-server-connection/index.html index e70bef3a..6663fa80 100644 --- a/public/post/weird-client-server-connection/index.html +++ b/public/post/weird-client-server-connection/index.html @@ -295,6 +295,10 @@ acl CONNECT method CONNECT Latest posts diff --git a/public/sitemap.xml b/public/sitemap.xml index ccc6679e..b8823303 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -4,7 +4,7 @@ https://h.cowbay.org/en/sitemap.xml - 2019-03-11T14:02:30+08:00 + 2019-03-20T11:42:47+08:00 diff --git a/public/tags/10g/index.html b/public/tags/10g/index.html index f1b20675..dde90250 100644 --- a/public/tags/10g/index.html +++ b/public/tags/10g/index.html @@ -204,6 +204,10 @@ Latest posts diff --git a/public/tags/ansible/index.html b/public/tags/ansible/index.html index cf27a9fd..2ebe03e7 100644 --- a/public/tags/ansible/index.html +++ b/public/tags/ansible/index.html @@ -306,6 +306,10 @@ Latest posts diff --git a/public/tags/backup/index.html b/public/tags/backup/index.html index 0c7f07ed..2dc25fa8 100644 --- a/public/tags/backup/index.html +++ b/public/tags/backup/index.html @@ -192,6 +192,10 @@ Latest posts diff --git a/public/tags/bookstack/index.html b/public/tags/bookstack/index.html index b3929cda..38cd8ced 100644 --- a/public/tags/bookstack/index.html +++ b/public/tags/bookstack/index.html @@ -202,6 +202,10 @@ Latest posts diff --git a/public/tags/docker/index.html b/public/tags/docker/index.html index 895b0c87..bfb9fcfb 100644 --- a/public/tags/docker/index.html +++ b/public/tags/docker/index.html @@ -202,6 +202,10 @@ Latest posts diff --git a/public/tags/du/index.html b/public/tags/du/index.html index 92f19fa7..bcef2dcc 100644 --- a/public/tags/du/index.html +++ b/public/tags/du/index.html @@ -189,6 +189,10 @@ Latest posts diff --git a/public/tags/firefox/index.html b/public/tags/firefox/index.html index 9268de73..42909c2b 100644 --- a/public/tags/firefox/index.html +++ b/public/tags/firefox/index.html @@ -194,6 +194,10 @@ Latest posts diff --git a/public/tags/freenas/index.html b/public/tags/freenas/index.html index e01369a9..92bd07cd 100644 --- a/public/tags/freenas/index.html +++ b/public/tags/freenas/index.html @@ -190,6 +190,10 @@ Latest posts diff --git a/public/tags/index.html b/public/tags/index.html index cfe61176..adaaec24 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -164,6 +164,10 @@ Latest posts diff --git a/public/tags/linux/index.html b/public/tags/linux/index.html index e719a20a..7a99f727 100644 --- a/public/tags/linux/index.html +++ b/public/tags/linux/index.html @@ -307,6 +307,10 @@ Latest posts diff --git a/public/tags/mdadm/index.html b/public/tags/mdadm/index.html index e923b8ff..09ea38bd 100644 --- a/public/tags/mdadm/index.html +++ b/public/tags/mdadm/index.html @@ -192,6 +192,10 @@ Latest posts diff --git a/public/tags/mellanox/index.html b/public/tags/mellanox/index.html index 45f5ae16..2a6efe1e 100644 --- a/public/tags/mellanox/index.html +++ b/public/tags/mellanox/index.html @@ -204,6 +204,10 @@ Latest posts diff --git a/public/tags/metabase/index.html b/public/tags/metabase/index.html index acfffaf4..a0a99d47 100644 --- a/public/tags/metabase/index.html +++ b/public/tags/metabase/index.html @@ -194,6 +194,10 @@ Latest posts diff --git a/public/tags/nas/index.html b/public/tags/nas/index.html index d1014fd7..be7e0d75 100644 --- a/public/tags/nas/index.html +++ b/public/tags/nas/index.html @@ -294,6 +294,10 @@ Latest posts diff --git a/public/tags/ps/index.html b/public/tags/ps/index.html index 06e094b6..340bb4fe 100644 --- a/public/tags/ps/index.html +++ b/public/tags/ps/index.html @@ -179,6 +179,10 @@ Latest posts diff --git a/public/tags/psql/index.html b/public/tags/psql/index.html index 33829f5f..17a7b0f9 100644 --- a/public/tags/psql/index.html +++ b/public/tags/psql/index.html @@ -192,6 +192,10 @@ Latest posts diff --git a/public/tags/raid/index.html b/public/tags/raid/index.html index be16c1f3..25c8b30e 100644 --- a/public/tags/raid/index.html +++ b/public/tags/raid/index.html @@ -190,6 +190,10 @@ Latest posts diff --git a/public/tags/ssh/index.html b/public/tags/ssh/index.html index 0cedf631..dfa4d1cc 100644 --- a/public/tags/ssh/index.html +++ b/public/tags/ssh/index.html @@ -203,6 +203,10 @@ Latest posts diff --git a/public/tags/synology/index.html b/public/tags/synology/index.html index 117463a4..a41e3984 100644 --- a/public/tags/synology/index.html +++ b/public/tags/synology/index.html @@ -294,6 +294,10 @@ Latest posts diff --git a/public/tags/ubuntu/index.html b/public/tags/ubuntu/index.html index d282dedb..1ace73e6 100644 --- a/public/tags/ubuntu/index.html +++ b/public/tags/ubuntu/index.html @@ -432,6 +432,10 @@ Latest posts diff --git a/public/tags/vim/index.html b/public/tags/vim/index.html index 1f623913..44c3564d 100644 --- a/public/tags/vim/index.html +++ b/public/tags/vim/index.html @@ -190,6 +190,10 @@ Latest posts diff --git a/public/tags/短今/index.html b/public/tags/短今/index.html index e68ed50b..d0abbb4a 100644 --- a/public/tags/短今/index.html +++ b/public/tags/短今/index.html @@ -179,6 +179,10 @@ Latest posts diff --git a/public/tags/筆記/index.html b/public/tags/筆記/index.html index 7f6f744c..e4b0010b 100644 --- a/public/tags/筆記/index.html +++ b/public/tags/筆記/index.html @@ -547,6 +547,10 @@ Latest posts diff --git a/public/tags/群暉/index.html b/public/tags/群暉/index.html index 233b20e4..271165b4 100644 --- a/public/tags/群暉/index.html +++ b/public/tags/群暉/index.html @@ -202,6 +202,10 @@ Latest posts