update some content
This commit is contained in:
@@ -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=1634607506" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
|
||||
<link href="https://h.cowbay.org/css/style.css?v=1635401692" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
|
||||
|
||||
<link href="https://h.cowbay.org/css/custom.css?v=1634607506" rel="stylesheet" type='text/css' media='all'>
|
||||
<link href="https://h.cowbay.org/css/custom.css?v=1635401692" 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">
|
||||
|
||||
@@ -311,7 +311,7 @@ if (!doNotTrack) {
|
||||
<p>但是一開始在執行的時候,碰到了一些錯誤</p>
|
||||
<h3 id="錯誤訊息">錯誤訊息</h3>
|
||||
<p>playbook 在執行時的錯誤訊息如下</p>
|
||||
<pre tabindex="0"><code>TASK [firefox : Create profiles] *************************************************************************************************
|
||||
<pre><code>TASK [firefox : Create profiles] *************************************************************************************************
|
||||
Tuesday 24 December 2019 14:28:58 +0800 (0:00:00.067) 0:00:00.946 ******
|
||||
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: b'Error: no DISPLAY environment variable specified\n'
|
||||
fatal: [hqdc075]: FAILED! => {
|
||||
@@ -359,7 +359,7 @@ hqdc075 : ok=3 changed=1 unreachable=0 failed=1 s
|
||||
<p>發現可以用 ssh_args 加入-o xxxxxx</p>
|
||||
<p>可是又找不到 ssh 怎麼用這個 -o</p>
|
||||
<p>只好又回去找辣個男人問看看ssh的參數</p>
|
||||
<pre tabindex="0"><code> -o option
|
||||
<pre><code> -o option
|
||||
Can be used to give options in the format used in the configuration file. This is useful for specifying options
|
||||
for which there is no separate command-line flag. For full details of the options listed below, and their possi‐
|
||||
ble values, see ssh_config(5).
|
||||
@@ -411,14 +411,14 @@ hqdc075 : ok=3 changed=1 unreachable=0 failed=1 s
|
||||
<p>但是真的不曉得怎麼區分這兩種</p>
|
||||
<p>反正只有兩個,就 try and error 吧</p>
|
||||
<p>在ansible 中修改inventory file ,在想要修改的 host 後面加入 ssh_args="-o ForwardAgent=yes"</p>
|
||||
<pre tabindex="0"><code>hqdc075 ansible_host=192.168.11.75 ssh_args="-o ForwardAgent=yes"
|
||||
<pre><code>hqdc075 ansible_host=192.168.11.75 ssh_args="-o ForwardAgent=yes"
|
||||
|
||||
</code></pre><p>或者 ansible.cfg</p>
|
||||
<p>在[ssh_connection]區段中</p>
|
||||
<p>加入</p>
|
||||
<pre tabindex="0"><code>ssh_args="-o ForwardAgent=yes"
|
||||
<pre><code>ssh_args="-o ForwardAgent=yes"
|
||||
</code></pre><p>再跑一次 就看到正常執行了</p>
|
||||
<pre tabindex="0"><code>PLAY RECAP ************************************************************************************************
|
||||
<pre><code>PLAY RECAP ************************************************************************************************
|
||||
hqdc075 : ok=7 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
|
||||
Tuesday 24 December 2019 14:37:37 +0800 (0:00:01.027) 0:00:17.879 ******
|
||||
@@ -433,7 +433,7 @@ firefox : debug ex ---- 0.07s
|
||||
|
||||
</code></pre><p>這次的過程,順便了解了ssh 加入 -X 可以在ssh session 中執行遠端主機上的圖形界面程式</p>
|
||||
<p>例如</p>
|
||||
<pre tabindex="0"><code>ssh -X username@hostname firefox
|
||||
<pre><code>ssh -X username@hostname firefox
|
||||
</code></pre><p>就可以透過ssh 執行遠端的firefox</p>
|
||||
<p>如下圖</p>
|
||||
<p><img src="https://i.imgur.com/5xoDFRe.png" alt=""></p>
|
||||
@@ -728,7 +728,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=1634607506"></script>
|
||||
<script src="https://h.cowbay.org/js/production.min.js?v=1635401692"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user