add auto fetch ssl certs

This commit is contained in:
2021-08-26 12:11:25 +08:00
parent 11ca254bed
commit 509ac048fc
237 changed files with 4968 additions and 7406 deletions

View File

@@ -13,7 +13,7 @@
"articleSection" : "post",
"name" : "[筆記] 為了保存log 用script 指令執行ansible \/ Another Way to Keep Ansible Log using script command",
"headline" : "[筆記] 為了保存log 用script 指令執行ansible \/ Another Way to Keep Ansible Log using script command",
"description" : "\x3cp\x3e之前為了能夠在執行完 ansible playbook 後能有個log 可以看\x3c\/p\x3e\n\n\x3cp\x3e所以在每次執行的時候都要加入 tee 的指令\x3c\/p\x3e\n\n\x3cp\x3e像是\x3c\/p\x3e\n\n\x3cpre\x3e\x3ccode\x3eANSIBLE_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\n\x3c\/code\x3e\x3c\/pre\x3e\n\n\x3cp\x3e一直都是放在crontab 裡面執行,也就沒有去管他\x3c\/p\x3e\n\n\x3cp\x3e反正也沒有人關心結果怎樣 (攤手\x3c\/p\x3e",
"description" : "\x3cp\x3e之前為了能夠在執行完 ansible playbook 後能有個log 可以看\x3c\/p\x3e\n\x3cp\x3e所以在每次執行的時候都要加入 tee 的指令\x3c\/p\x3e\n\x3cp\x3e像是\x3c\/p\x3e\n\x3cpre\x3e\x3ccode\x3eANSIBLE_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\n\x3c\/code\x3e\x3c\/pre\x3e\x3cp\x3e一直都是放在crontab 裡面執行,也就沒有去管他\x3c\/p\x3e\n\x3cp\x3e反正也沒有人關心結果怎樣 (攤手\x3c\/p\x3e",
"inLanguage" : "en",
"author" : "Eric Chang",
"creator" : "Eric Chang",
@@ -45,9 +45,9 @@
<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=1626744134" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/style.css?v=1629951055" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1626744134" rel="stylesheet" type='text/css' media='all'>
<link href="https://h.cowbay.org/css/custom.css?v=1629951055" 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">
@@ -81,10 +81,6 @@ if (!doNotTrack) {
<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>
@@ -309,28 +305,16 @@ if (!doNotTrack) {
<div class="entry-content">
<article>
<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>
</code></pre><p>一直都是放在crontab 裡面執行,也就沒有去管他</p>
<p>反正也沒有人關心結果怎樣 (攤手</p>
<p>後來發現有個指令叫 script 可以完整紀錄指令執行期間的console 畫面變化(包含了ansi color!)</p>
<p>剛剛測試了一下,發現的確是可以用,不過也沒感覺有特別好用的地方,就只是做個紀錄吧,說不定以後其他地方可以用得到</p>
<pre><code>sciprt -c 'make EXTRA_ARGS=&quot;-i inventory/production --limit hqpc074&quot; user_client' -f hqpc074.out'
</code></pre>
<p>結果長這樣
<img src="https://i.imgur.com/F9KFAWV.png" alt="" /></p>
</code></pre><p>結果長這樣
<img src="https://i.imgur.com/F9KFAWV.png" alt=""></p>
<p>就真的跟console 的畫面一樣</p>
</article>
</div>
@@ -606,7 +590,7 @@ title="pinterest icon"></i>
</ul> <div class="design-credit">
<p>&copy; 2018 Göran Svensson</p>
<p>© 2018 Göran Svensson</p>
<p>Nederburg Hugo Theme by <a href="https://appernetic.io">Appernetic</a>.</p>
@@ -618,7 +602,7 @@ title="pinterest icon"></i>
</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=1626744134"></script>
<script src="https://h.cowbay.org/js/production.min.js?v=1629951055"></script>
</body>
</html>