Created
April 8, 2017 05:23
-
-
Save mrlesmithjr/3b1cde5ee12bff76f31b9317a3a7e2f9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| --- | |
| hostipmacs: | |
| {% for item in csvfile.split("\n") %} | |
| {% if loop.index != 1 %} | |
| {% set list = item.split(",") %} | |
| - host: '{{ list[0]|trim() }}' | |
| inventory_name: '{{ list[1]|trim() }}' | |
| ip: '{{ list[2]|trim() }}' | |
| mac: '{{ list[3]|trim() }}' | |
| {% endif %} | |
| {% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment