or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
課程八:Ansible 進階用法
2022年下學期,明新科技大學資管系
講師:胡嘉璽
課程重點
課程重點
Ansible Facts是什麼
playbook
時,系統會自動執行setup
這個模組- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →setup
模組的用處利用
ad hoc
指令查看系統變數查看
server1.info
利用
filer
來過濾出系統變數查看套件管理器
安裝docker時讀取系統變數
不需指定ubuntu版本代號
課程重點
template的用處
j2
作為副檔名在遠端
git clone
.zshrc.j2
的部分內容設定
zsh
的主題執行後的結果
課程重點
什麼是Roles
什麼是Roles
如何建立一個Role
Role的結構目錄
包括內部的檔案
檔案說明
Role的使用
建立一個Webserver的Role
課程重點
建立專案目錄及設定
建立需要的Roles
建立apt的role
apt的task
~/project01/roles/apt/tasks/main.yml
撰寫專案
yaml
~/project01/main.yaml
測試專案
撰寫
zsh
的task~/project01/roles/zsh/tasks/main.yaml
撰寫
zsh
的task~/project01/roles/zsh/vars/main.yaml
幹嘛自己寫role?
~/.ansible/roles
中,隨時可取用安裝
oh-my-zsh
的role查看其網頁說明檔
修改原來的playbook
~/project01/main.yaml
將
oh-my-zsh
的主題及設定檔修改下載之前定義好的設定檔
撰寫新role的工作
~/project01/roles/omz/tasks/main.yml
修改專案的
main.yaml