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) {
|
||||
<h3 id="task-內容">TASK 內容</h3>
|
||||
<p>其實task 內容沒有很複雜,簡單來說,就是先檢查user的 firefox profile 目錄</p>
|
||||
<p>如果存在就pass,如果不存在就幫user建立</p>
|
||||
<pre tabindex="0"><code>- name: check if user profile exists
|
||||
<pre><code>- name: check if user profile exists
|
||||
become_user: "{{ item.name }}"
|
||||
stat:
|
||||
path: "{{ firefox_home }}"
|
||||
@@ -323,7 +323,7 @@ if (!doNotTrack) {
|
||||
<p>所以可以肯定的是 stat 這個屬性一定在</p>
|
||||
<p>可是也一定有什麼問題,造成取不到值</p>
|
||||
<p>當然就是先debug 來看看(有些不重要的屬性,我就先拿掉了)</p>
|
||||
<pre tabindex="0"><code>ok: [hqdc075] => {
|
||||
<pre><code>ok: [hqdc075] => {
|
||||
"profile_exists": {
|
||||
"changed": false,
|
||||
"msg": "All items completed",
|
||||
@@ -391,7 +391,7 @@ if (!doNotTrack) {
|
||||
<h3 id="修正後續task">修正後續task</h3>
|
||||
<p>後面的task 稍微改一下,在指定 with_items 的時候,直接指定 profile_exists.results</p>
|
||||
<p>接下來的用法就比較簡單了,跟原本接stat 變數的語法差不多</p>
|
||||
<pre tabindex="0"><code>- name: run firefox to create default profile
|
||||
<pre><code>- name: run firefox to create default profile
|
||||
become_user: "{{ item.item.name }}"
|
||||
shell: "firefox --headless &"
|
||||
ignore_errors: True
|
||||
@@ -688,7 +688,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