You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

902 lines
23 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en-us">
<head>
<meta name="generator" content="Hugo 0.58.3" /><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https:\/\/h.cowbay.org"
},
"articleSection" : "",
"name" : "MC部落",
"headline" : "MC部落",
"description" : "",
"inLanguage" : "en",
"author" : "",
"creator" : "",
"publisher": "",
"accountablePerson" : "",
"copyrightHolder" : "",
"copyrightYear" : "2021",
"datePublished": "2021-06-25 15:49:54 \x2b0800 CST",
"dateModified" : "2021-06-25 15:49:54 \x2b0800 CST",
"url" : "https:\/\/h.cowbay.org\/",
"wordCount" : "0",
"image" : "https://h.cowbay.org%!s(\u003cnil\u003e)"",
"keywords" : [ "Blog" ]
}
</script>
<title>MC部落 - Whats the Worst That Could Happen?</title>
<meta name="description" content="some articles about job,food,passion sisters" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="all,follow">
<meta name="googlebot" content="index,follow,snippet,archive">
<link rel="stylesheet" id="ct-tracks-google-fonts-css" href="https://fonts.googleapis.com/css?family=Raleway%3A400%2C700&amp;subset=latin%2Clatin-ext&amp;ver=4.7.2" type="text/css" media="all">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<link href="https://h.cowbay.org/css/style.css?v=1624608657" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1624608657" rel="stylesheet" type='text/css' media='all'>
<link rel="shortcut icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
<link rel="icon" href="https://h.cowbay.org/img/favicon.ico" type="image/x-icon">
<link href="https://h.cowbay.org/index.xml" rel="alternate" type="application/rss+xml" title="MC部落" />
<link href="https://h.cowbay.org/index.xml" rel="feed" type="application/rss+xml" title="MC部落" />
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-138954876-1', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
</head>
<body class="home blog ct-body standard">
<div id="overflow-container" class="overflow-container">
<a class="skip-content" href="#main">Skip to content</a>
<header id="site-header" class="site-header" role="banner">
<div class='top-navigation'>
<div class='container'>
<div id="menu-secondary" class="menu-container menu-secondary" role="navigation">
<button id="toggle-secondary-navigation" class="toggle-secondary-navigation"><i class="fas fa-plus"></i></button>
<div class="menu">
<ul id="menu-secondary-items" class="menu-secondary-items">
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/"></a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/ansible">ansible</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/linux">linux</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/proxmox">proxmox</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/ps">ps</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/%E7%A2%8E%E5%BF%B5">碎念</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/%E7%BE%A4%E6%9A%89">群暉</a>
</li>
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="/categories/%E9%9B%9C%E5%BF%B5">雜念</a>
</li>
</ul>
</div>
</div>
<ul class="social-media-icons">
<li>
<a href="full%20Social%20profile%20url%20in%20facebook" data-animate-hover="pulse" class="facebook" target="_blank">
<i class="fab fa-facebook-square" title="facebook"></i>
<span class="screen-reader-text">facebook</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20googleplus" data-animate-hover="pulse" class="gplus" target="_blank">
<i class="fab fa-google-plus-g" title="googleplus"></i>
<span class="screen-reader-text">googleplus</span>
</a>
</li>
<li>
<a href="chang0206" data-animate-hover="pulse" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
<li>
<a href="chang0206" data-animate-hover="pulse" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
<li>
<a href="mailto:mc@hotshraingmy.info" data-animate-hover="pulse" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20linkedin" data-animate-hover="pulse" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20stackoverflow" data-animate-hover="pulse" class="stackoverflow" target="_blank">
<i class="fab fa-stack-overflow" title="stackoverflow"></i>
<span class="screen-reader-text">stackoverflow</span>
</a>
</li>
<li>
<a href="changchichung" data-animate-hover="pulse" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20pinterest" data-animate-hover="pulse" class="pinterest" target="_blank">
<i class="fab fa-pinterest" title="pinterest"></i>
<span class="screen-reader-text">pinterest</span>
</a>
</li>
<li>
<a href="https://h.cowbay.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
</ul></div>
</div>
<div class="container">
<div id="title-info" class="title-info">
<div id='site-title' class='site-title'>
<a href="/"> MC部落 </a>
</div>
</div>
<button id="toggle-navigation" class="toggle-navigation">
<i class="fas fa-bars"></i>
</button>
<div id="menu-primary-tracks" class="menu-primary-tracks"></div>
<div id="menu-primary" class="menu-container menu-primary" role="navigation">
<p class="site-description">Whats the Worst That Could Happen?</p>
<div class="menu">
<ul id="menu-primary-items" class="menu-primary-items">
<li class='menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item'>
<a href="https://h.cowbay.org/">Home</a>
</li>
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
<a href="https://h.cowbay.org/about/">About</a>
</li>
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
<a href="https://h.cowbay.org/contact/">Get in touch</a>
</li>
</ul>
</div>
</div>
</div>
</header>
<div id="main" class="main" role="main">
<h1 class="screen-reader-text">Posts</h1>
<div id="loop-container" class="loop-container">
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured odd excerpt">
<a class="featured-image-link" href="https://h.cowbay.org/post/ansible-selectattr-filter/"><div class='featured-image lazy lazy-bg-image' data-background="https://h.cowbay.org/images/post-default-11.jpg"></div></a>
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">29 November</span>
<span> / </span>
<span class="author">
<a href="https://github.com/changchichung" title="Posts by Eric Chang" rel="author">Eric Chang</a>
</span>
<span> / </span>
<span class="category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
</div>
<div class='excerpt-header'>
<h2 class='excerpt-title'>
<a href="https://h.cowbay.org/post/ansible-selectattr-filter/ "> [筆記] 還是 Ansible Selectattr </a>
</h2>
</div>
<div class='excerpt-content'>
<article>
<p>在上一篇 <a href="https://h.cowbay.org/post/ansible-selectattr/">Ansible how to use &lsquo;list&rsquo; in yaml file </a></p>
<p>有提到怎麼用 with_items / set_fact 來取得在yaml 檔案中的清單</p>
<p>不過就是有點醜</p>
<div class="more-link-wrapper"><a class="more-link" href="https://h.cowbay.org/post/ansible-selectattr-filter/">Read the post<span class="screen-reader-text">This is a Standard Post</span></a></div>
</article>
</div>
</div>
</div>
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured even excerpt">
<a class="featured-image-link" href="https://h.cowbay.org/post/ansible-selectattr/"><div class='featured-image lazy lazy-bg-image' data-background="https://h.cowbay.org/images/post-default-1.jpg"></div></a>
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">27 November</span>
<span> / </span>
<span class="author">
<a href="https://github.com/changchichung" title="Posts by Eric Chang" rel="author">Eric Chang</a>
</span>
<span> / </span>
<span class="category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
</div>
<div class='excerpt-header'>
<h2 class='excerpt-title'>
<a href="https://h.cowbay.org/post/ansible-selectattr/ "> [筆記] Ansible how to use &#39;list&#39; in yaml file </a>
</h2>
</div>
<div class='excerpt-content'>
<article>
<p>這幾天在玩ansible 時,碰到一個問題</p>
<p>假如我有個yaml檔作為資料來源檔名是 abc.yml</p>
<p>大概長這樣</p>
<pre><code> &quot;teams&quot;: [
{
&quot;chinese_name&quot;: &quot;TEAM1&quot;,
&quot;description&quot;: &quot;TEAM1&quot;,
&quot;gid&quot;: 10125,
&quot;location&quot;: [
&quot;hq&quot;
],
&quot;name&quot;: &quot;aa&quot;,
&quot;users&quot;: [
&quot;chen&quot;,
&quot;chou&quot;,
&quot;huani&quot;,
&quot;yey&quot;,
&quot;wa&quot;
]
},
{
&quot;chinese_name&quot;: &quot;TEAM2&quot;,
&quot;description&quot;: &quot;TEAM2&quot;,
&quot;gid&quot;: 10126,
&quot;location&quot;: [
&quot;hq&quot;
],
&quot;name&quot;: &quot;bb&quot;,
&quot;users&quot;: [
&quot;chhiao&quot;,
&quot;chgc&quot;,
&quot;chy&quot;,
&quot;hsi&quot;,
&quot;li&quot;,
&quot;li&quot;,
&quot;chgchi&quot;
]
}
]
</code></pre>
<div class="more-link-wrapper"><a class="more-link" href="https://h.cowbay.org/post/ansible-selectattr/">Read the post<span class="screen-reader-text">This is a Standard Post</span></a></div>
</article>
</div>
</div>
</div>
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured odd excerpt">
<a class="featured-image-link" href="https://h.cowbay.org/post/change-preferred-language-in-firefox/"><div class='featured-image lazy lazy-bg-image' data-background="https://h.cowbay.org/images/post-default-9.jpg"></div></a>
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">15 November</span>
<span> / </span>
<span class="author">
<a href="https://github.com/changchichung" title="Posts by Eric Chang" rel="author">Eric Chang</a>
</span>
<span> / </span>
<span class="category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
</div>
<div class='excerpt-header'>
<h2 class='excerpt-title'>
<a href="https://h.cowbay.org/post/change-preferred-language-in-firefox/ "> [筆記] 為了metabase 修改 firefox 開啟網頁時使用的預設語言 change the preferred language in firefox for metabase </a>
</h2>
</div>
<div class='excerpt-content'>
<article>
<p>最近在測試metabase記得幾個月前就有測試過</p>
<p>但是當時的界面和現在的樣子差很多,看樣子改版還滿勤勞的</p>
<p>所以這次改用docker來建立根本五分鐘不到就建好了(挖鼻孔)</p>
<p>不過呢,很討厭的是,一進去就發現語系採用的是簡體中文</p>
<div class="more-link-wrapper"><a class="more-link" href="https://h.cowbay.org/post/change-preferred-language-in-firefox/">Read the post<span class="screen-reader-text">This is a Standard Post</span></a></div>
</article>
</div>
</div>
</div>
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured even excerpt">
<a class="featured-image-link" href="https://h.cowbay.org/post/copy_role_in_pgsql/"><div class='featured-image lazy lazy-bg-image' data-background="https://h.cowbay.org/images/post-default-7.jpg"></div></a>
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">12 November</span>
<span> / </span>
<span class="author">
<a href="https://github.com/changchichung" title="Posts by Eric Chang" rel="author">Eric Chang</a>
</span>
<span> / </span>
<span class="category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
</div>
<div class='excerpt-header'>
<h2 class='excerpt-title'>
<a href="https://h.cowbay.org/post/copy_role_in_pgsql/ "> PostgreSQL 直接從已經存在的使用者複製權限到另一個使用者 </a>
</h2>
</div>
<div class='excerpt-content'>
<article>
<p>因為工作上的需求有個資料庫需要開放給不同team的人去存取</p>
<p>雖然都是在同一台機器上的同一個資料庫</p>
<p>但是希望能夠不同team的人用不同的資料庫使用者</p>
<p>這樣萬一出事,會比較好抓兇手??</p>
<div class="more-link-wrapper"><a class="more-link" href="https://h.cowbay.org/post/copy_role_in_pgsql/">Read the post<span class="screen-reader-text">This is a Standard Post</span></a></div>
</article>
</div>
</div>
</div>
<div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-memories tag-normal-post tag-standard-2 excerpt zoom full-without-featured odd excerpt">
<a class="featured-image-link" href="https://h.cowbay.org/post/weird-client-server-connection/"><div class='featured-image lazy lazy-bg-image' data-background="https://h.cowbay.org/images/post-default-4.jpg"></div></a>
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">08 November</span>
<span> / </span>
<span class="author">
<a href="https://github.com/changchichung" title="Posts by Eric Chang" rel="author">Eric Chang</a>
</span>
<span> / </span>
<span class="category">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
</div>
<div class='excerpt-header'>
<h2 class='excerpt-title'>
<a href="https://h.cowbay.org/post/weird-client-server-connection/ "> [筆記] 詭異的client&amp;server間連線的問題或許跟KVM有關係 </a>
</h2>
</div>
<div class='excerpt-content'>
<article>
<p>這是發生在一個夜黑風高的寂寥深夜&hellip;.. ( What The FXXX &hellip; )</p>
<p>來到這個環境之後,有一個很詭異的狀況一直困擾著我</p>
<p>在每個分公司都會有一台伺服器作為KVM Host</p>
<p>上面跑兩台VM一台作為ansible controller (目前沒作用)</p>
<p>另一台作為這邊所謂的 &ldquo;Build Server&rdquo;</p>
<p>用途包含了DHCP Server / Proxy Server (squid3) / APT Proxy (squid-deb-proxy)</p>
<p>問題就發生在這台 Build Server 上&hellip;</p>
<div class="more-link-wrapper"><a class="more-link" href="https://h.cowbay.org/post/weird-client-server-connection/">Read the post<span class="screen-reader-text">This is a Standard Post</span></a></div>
</article>
</div>
</div>
</div>
</div>
<nav class="navigation pagination" role="navigation">
<h2 class="screen-reader-text">Posts navigation</h2>
<div class="nav-links">
<a class="prev page-numbers" href="/page/11/">Previous</a>
<a class="page-numbers" href="/">1</a>
<a class="page-numbers" href="/page/2/">2</a>
<a class="page-numbers" href="/page/3/">3</a>
<span aria-current="page" class="page-numbers current">4</span>
<a class="page-numbers" href="/page/11/">11</a>
<a class="page-numbers" href="/page/12/">12</a>
<a class="page-numbers" href="/page/13/">13</a>
<a class="next page-numbers" href="/page/13/">Next</a>
</div>
</nav>
</div>
<footer id="site-footer" class="site-footer" role="contentinfo">
<h1>
<a href=""> MC部落 </a>
</h1>
<p class="site-description">Whats the Worst That Could Happen?</p>
<div id="menu-footer" class="menu-container menu-footer" role="navigation">
<div class="menu">
<ul id="menu-footer-items" class="menu-footer-items">
</ul>
</div> </div>
<ul class="social-media-icons">
<li>
<a class="facebook" target="_blank"
href="full%20Social%20profile%20url%20in%20facebook" >
<i class="fab fa-facebook-f" title="facebook"></i>
<span class="screen-reader-text">facebook</span>
</a>
</li>
<li>
<a class="googleplus" target="_blank"
href="full%20profile%20url%20in%20googleplus" >
<i class="fab fa-google-plus-g" title="googleplus"></i>
<span class="screen-reader-text">googleplus</span>
</a>
</li>
<li>
<a href="chang0206" class="twitter" target="_blank">
<i class="fab fa-twitter-square" title="twitter"></i>
<span class="screen-reader-text">twitter</span>
</a>
</li>
<li>
<a href="chang0206" class="instagram" target="_blank">
<i class="fab fa-instagram" title="instagram"></i>
<span class="screen-reader-text">instagram</span>
</a>
</li>
<li>
<a href="mailto:mc@hotshraingmy.info" class="email">
<i class="fas fa-envelope" title="email"></i>
<span class="screen-reader-text">email</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20linkedin" class="linkedin" target="_blank">
<i class="fab fa-linkedin-in" title="linkedin"></i>
<span class="screen-reader-text">linkedin</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20stackoverflow" class="stackoverflow" target="_blank">
<i class="fab fa-stack-overflow" title="stackoverflow"></i>
<span class="screen-reader-text">stackoverflow</span>
</a>
</li>
<li>
<a href="changchichung" class="github" target="_blank">
<i class="fab fa-github" title="github"></i>
<span class="screen-reader-text">github</span>
</a>
</li>
<li>
<a href="full%20profile%20url%20in%20pinterest" class="pinterest" target="_blank">
<i class="fab fa-pinterest" title="pinterest"></i>
<span class="screen-reader-text">pinterest</span>
</a>
</li>
<li>
<a href="https://h.cowbay.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
<i class="fas fa-rss" title="rss"></i>
<span class="screen-reader-text">rss</span>
</a>
</li>
</ul> <div class="design-credit">
<p>&copy; 2018 Göran Svensson</p>
<p>Nederburg Hugo Theme by <a href="https://appernetic.io">Appernetic</a>.</p>
<p>A port of Tracks by Compete Themes.</p>
</div>
</footer>
</div>
<script src="https://h.cowbay.org/js/jquery.min.js"></script>
<script src="https://h.cowbay.org/js/jquerymigrate.js"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1624608657"></script>
</body>
</html>