This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
ka
/
ansible-role-home
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
vm ip config
systemd-xsession
Markus Katharina Brechtel
4 years ago
parent
3ee63770f1
commit
6f25d6fc32
2 changed files
with
16 additions
and
0 deletions
Split View
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
View File
@@ -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
View File
@@ -0,0 +1,4 @@
{% for hostname in groups.vms %}
Host {{hostname}}
HostName {{hostvars[hostname].external_ip}}
{% endfor %}