|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
<channel>
|
|
|
<title>Posts - MCの飄狂山莊㊣</title>
|
|
|
<link>https://h.cowbay.org/post/</link>
|
|
|
<description>Recent content in Posts on MCの飄狂山莊㊣</description>
|
|
|
<generator>Hugo -- gohugo.io</generator>
|
|
|
<lastBuildDate>Fri, 04 Oct 2019 14:12:15 +0800</lastBuildDate>
|
|
|
|
|
|
<atom:link href="https://h.cowbay.org/post/index.xml" rel="self" type="application/rss+xml" />
|
|
|
|
|
|
<item>
|
|
|
<title>[筆記] 在edgerouter上用wireguard 建立site to site VPN / Site to Site Vpn Using Wireguard in Two Edgerouters</title>
|
|
|
<link>https://h.cowbay.org/post/site-to-site-vpn-using-wireguard-in-two-edgerouters/</link>
|
|
|
<pubDate>Tue, 06 Aug 2019 17:14:17 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/site-to-site-vpn-using-wireguard-in-two-edgerouters/</guid>
|
|
|
<description><p>之前總部和分公司之間 是用buffalo 的小AP 灌 openwrt</p>
|
|
|
|
|
|
<p>然後用strongswan 來打 IPSEC site to site VPN</p>
|
|
|
|
|
|
<p>config 看起來不是很難 (只是看起來)</p>
|
|
|
|
|
|
<p>但是實際上已經找不到當初的文件</p>
|
|
|
|
|
|
<p>所以要維護很困難(光那些RSA KEY 就不知道為何、如何產生)</p>
|
|
|
|
|
|
<p>後來採購了兩台edgerouter X 做測試</p>
|
|
|
|
|
|
<p>也用openvpn 成功的建立了 site to site VPN</p>
|
|
|
|
|
|
<p>本來想說 openvpn 已經夠簡單了</p>
|
|
|
|
|
|
<p>今天看到文章說用wireguard 可以更簡單</p>
|
|
|
|
|
|
<p>於是研究了一下,發現還真的很簡單!</p></description>
|
|
|
</item><item>
|
|
|
<title>[筆記] 為了保存log 用script 指令執行ansible / Another Way to Keep Ansible Log using script command</title>
|
|
|
<link>https://h.cowbay.org/post/another-way-to-keep-ansible-log/</link>
|
|
|
<pubDate>Mon, 05 Aug 2019 16:24:40 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/another-way-to-keep-ansible-log/</guid>
|
|
|
<description><p>之前為了能夠在執行完 ansible playbook 後,能有個log 可以看</p>
|
|
|
|
|
|
<p>所以在每次執行的時候,都要加入 tee 的指令</p>
|
|
|
|
|
|
<p>像是</p>
|
|
|
|
|
|
<pre><code>ANSIBLE_CONFIG=/home/D/ansiblecontrol/ansible.cfg /usr/local/bin/ansible-playbook /home/D/ansiblecontrol/playbook.user_client.yml --vault-password-file=/home/D/ansiblecontrol/vault.passwd -i /home/D/ansiblecontrol/inventory/production -f1 --limit tyuserclients |tee /tmp/tyuserclients.log
|
|
|
</code></pre>
|
|
|
|
|
|
<p>一直都是放在crontab 裡面執行,也就沒有去管他</p>
|
|
|
|
|
|
<p>反正也沒有人關心結果怎樣 (攤手</p></description>
|
|
|
</item><item>
|
|
|
<title>[筆記] 用pxe 安裝系統,完成後送出郵件通知 / send mail notification after pxe install</title>
|
|
|
<link>https://h.cowbay.org/post/send-mail-to-notify-after-pxe-install/</link>
|
|
|
<pubDate>Wed, 31 Jul 2019 11:06:33 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/send-mail-to-notify-after-pxe-install/</guid>
|
|
|
<description><p>最近有個任務,需要大量安裝client</p>
|
|
|
|
|
|
<p>想用PXE來處理,只要user開機按F12(acer 桌機) 選擇PXE Boot</p>
|
|
|
|
|
|
<p>然後選擇OS版本,就可以自動進行安裝</p>
|
|
|
|
|
|
<p>安裝完成後,會自動重新開機,接著就用ansible來做user環境設定</p>
|
|
|
|
|
|
<p>PXE的部份本來是沒有什麼問題,自動安裝系統的部份都做好了</p>
|
|
|
|
|
|
<p>可是因為這次的量比較多,想說讓每一台在完成PXE安裝後的第一次重開機</p>
|
|
|
|
|
|
<p>就送出一封郵件來通知我,說已經完成安裝,可以執行ansible 了</p>
|
|
|
|
|
|
<p>看似很簡單的一件事情,卻搞了我兩天&hellip;.</p></description>
|
|
|
</item><item>
|
|
|
<title>[ansible] 用 ip 位置判斷是否要執行task /ansible run task depends on ipaddr</title>
|
|
|
<link>https://h.cowbay.org/post/ansible-run-task-depends-on-ipaddr/</link>
|
|
|
<pubDate>Tue, 23 Jul 2019 15:06:37 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/ansible-run-task-depends-on-ipaddr/</guid>
|
|
|
<description><p>因為工作上的需要,要修改client端的 /etc/environment 檔案</p>
|
|
|
|
|
|
<p>在有權限使用proxy 服務的user的環境中,加入proxy 的設定</p>
|
|
|
|
|
|
<p>原本的清單中,有host/user/ip 這幾個值可以拿來判斷</p>
|
|
|
|
|
|
<p>proxy server 那邊是採用ip 來控制,所以這邊也跟著用 ip 來判斷要不要修改 /etc/environment</p></description>
|
|
|
</item><item>
|
|
|
<title>[ansible] 引用事先定義好的yaml檔裡面的變數 - Ansible Selectattr From List in Dictionary file</title>
|
|
|
<link>https://h.cowbay.org/post/ansible-selectattr-from-list-in-dictionary/</link>
|
|
|
<pubDate>Mon, 01 Jul 2019 09:06:12 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/ansible-selectattr-from-list-in-dictionary/</guid>
|
|
|
<description><p>在ansible中,關於如何引用自定義的變數,一直讓我很頭疼</p>
|
|
|
|
|
|
<p>尤其是有牽涉到從外部導入yaml檔案時,更是常常讓我不知道到底該怎麼抓出想要的變數</p>
|
|
|
|
|
|
<p>這次還是用selectattr 來處理,希望下次能夠記得&hellip;</p></description>
|
|
|
</item><item>
|
|
|
<title>linux底下遠端遙控&管理的好用系統 Meshcentral / Remote Management & control system Meshcentral</title>
|
|
|
<link>https://h.cowbay.org/post/remote-management-system-meshcentral/</link>
|
|
|
<pubDate>Thu, 20 Jun 2019 11:03:12 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/remote-management-system-meshcentral/</guid>
|
|
|
<description><p>之前在LAN/windows環境下,一直都是用ultravnc/winvnc/tigervnc之類的VNC軟體</p>
|
|
|
|
|
|
<p>但是如果要過 internet ,就會碰到各種開port的問題</p>
|
|
|
|
|
|
<p>在這種環境下,就有了當時 teamviewer 的橫空出世</p>
|
|
|
|
|
|
<p>解決了開PORT的問題,讓被控端(通常是資訊技術相對弱勢,需要接受幫助的一方)不需要懂太多</p>
|
|
|
|
|
|
<p>只要下載teamviewer被控端,開啟後報ID 給協助者就好了</p></description>
|
|
|
</item><item>
|
|
|
<title>Install Asus 10G NIC XG-C100C in Proxmox</title>
|
|
|
<link>https://h.cowbay.org/post/install-asus-10g-nic-in-proxmox/</link>
|
|
|
<pubDate>Mon, 17 Jun 2019 13:20:57 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/install-asus-10g-nic-in-proxmox/</guid>
|
|
|
<description><p>前幾天接的一個case</p>
|
|
|
|
|
|
<p>因為費用的關係,所以沒有考慮用傳統定義上的伺服器(DELL R640)</p>
|
|
|
|
|
|
<p>改採用比較高階一點的洋垃圾,規格大概是 Intel E5-2680V2 x2 + 64G RAM + 128G SSD x2 (OS) + 960G SSD x4 (raid 10 , zfs)</p>
|
|
|
|
|
|
<p>storage 選擇QNAP NAS TS-932X + 960G SSD x 4 (raid 10 , NFS) + QNAP 10G Switch QSW-1280C-8C</p>
|
|
|
|
|
|
<p>既然storage這邊選用了10G的機種,伺服器上當然也要增加10G網卡</p>
|
|
|
|
|
|
<p>一樣,成本考量,就不用INTEL 了,買了這張 ASUS 10G 網卡</p></description>
|
|
|
</item><item>
|
|
|
<title>[筆記] 修改 docker 容器內的時區 - Change Timezone in Docker</title>
|
|
|
<link>https://h.cowbay.org/post/change-timezone-in-docker/</link>
|
|
|
<pubDate>Tue, 21 May 2019 17:25:15 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/change-timezone-in-docker/</guid>
|
|
|
<description><p>最近一直在玩一些docker,不過老是會碰到歪果扔寫的東西,時區都不一致</p>
|
|
|
|
|
|
<p>有的用 UTC,有的用localtime,就是沒碰到用 Asia/Taipei 的&hellip;.</p></description>
|
|
|
</item><item>
|
|
|
<title>Transfer File Content Using Xclip in Terminal</title>
|
|
|
<link>https://h.cowbay.org/post/transfer-file-content-using-xclip-in-terminal/</link>
|
|
|
<pubDate>Fri, 17 May 2019 12:18:54 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/transfer-file-content-using-xclip-in-terminal/</guid>
|
|
|
<description><p>工作上常會需要用ssh登入遠端主機檢查LOG,有必要的時候,還要把log複製回本機來處理。</p>
|
|
|
|
|
|
<p>以前都是傻傻的用 scp 傳檔案</p>
|
|
|
|
|
|
<p>之前就記得有這個xclip/xsel 可以用,但是一直沒有弄清楚怎麼執行</p>
|
|
|
|
|
|
<p>早上研究了一下,順便做個筆記。</p></description>
|
|
|
</item><item>
|
|
|
<title>[筆記] inxi 蒐集詳盡的硬體資訊 / inxi Collect Detail Hardware Info</title>
|
|
|
<link>https://h.cowbay.org/post/inx-collect-detail-hardware-info/</link>
|
|
|
<pubDate>Tue, 23 Apr 2019 15:28:56 +0800</pubDate>
|
|
|
|
|
|
<guid>https://h.cowbay.org/post/inx-collect-detail-hardware-info/</guid>
|
|
|
<description><p>最近因為一直碰到硬碟故障的問題,算起來那一批同時購買的5X顆 seagate 2T硬碟,已經有一半以上故障返修了&hellip;.</p>
|
|
|
|
|
|
<p>然後又因為一直沒有添購新的硬碟,只能用這些快過保/已過保的撐著</p>
|
|
|
|
|
|
<p>所以最近不斷的在更換機器內的硬碟,而且還沒有熱插拔!</p>
|
|
|
|
|
|
<p>也導致原本負責處理盤點資產的同事困擾,因為跟手邊的紀錄已經對不起來了</p>
|
|
|
|
|
|
<p>然後就變成要對資產的時候,需要一台一台登入,然後去下不同的指令,取得想要的硬體資訊,超級麻煩的!</p></description>
|
|
|
</item>
|
|
|
</channel>
|
|
|
</rss> |