-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ubuntu wsl in windows preparing. (see #19)
- Loading branch information
1 parent
653458f
commit 11cb793
Showing
3 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ITNOA | ||
|
||
- name: show write custom value based on host in each host | ||
hosts: all | ||
tasks: | ||
- name: show write custom value based on host in each host | ||
# command: echo "{{hostvars['{{inventory_hostname}}']['custom_var']}}" | ||
shell: > | ||
echo "{{ hostvars[inventory_hostname]['ss'] }}aa" | tee /tmp/host_var.txt | ||
# echo "{{ hostvars[item]['ss'] }}" | tee /tmp/host_var.txt | ||
# when: ansible_hostname == "item" | ||
# with_items: | ||
# - "{{ groups['workers'] }}" | ||
- debug: | ||
# msg: "{{hostvars['{{inventory_hostname}}']}}" | ||
msg: "{{inventory_hostname}}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters