This website works better with JavaScript.
首頁
探索
說明
註冊
登入
ka
/
ansible-role-home
關註
1
收藏
0
複製
0
程式碼
問題管理
0
合併請求
0
版本發佈
0
Wiki
Activity
瀏覽代碼
vm ip config
systemd-xsession
Markus Katharina Brechtel
4 年之前
父節點
3ee63770f1
當前提交
6f25d6fc32
共有
2 個文件被更改
,包括
16 次插入
和
0 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+12
-0
tasks/ssh.yaml
+4
-0
templates/ssh.config.j2
+ 12
- 0
tasks/ssh.yaml
查看文件
@@ -5,3 +5,15 @@
src: ~/ssh-keys/
dest: ~/ssh-keys
mode: u=rw,g=,o=
- name: ssh auto config
template:
src: ssh.config.j2
dest: ~/.ssh/config.auto
- name: include ssh auto config
lineinfile:
path: ~/.ssh/config
line: Include config.auto
insertbefore: BOF
create: true
+ 4
- 0
templates/ssh.config.j2
查看文件
@@ -0,0 +1,4 @@
{% for hostname in groups.vms %}
Host {{hostname}}
HostName {{hostvars[hostname].external_ip}}
{% endfor %}