Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue#486 motd #487

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Only loop over interfaces who know ipv4.address attribute
  • Loading branch information
Thilo Solbrig committed Oct 14, 2024
commit aac099b66bc4ac6803701f74bc80a1b8cb359b26
2 changes: 1 addition & 1 deletion roles/common/templates/motd.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Welcome to {{ ansible_hostname }}

FQDN: {{ ansible_fqdn }}
IP's:
{% for a in ansible_interfaces %}
{% if a != 'lo' and hostvars[inventory_hostname]['ansible_'~a]['ipv4']['address'] is defined %}
{% if a != 'lo' %}
{{a}}: {{ hostvars[inventory_hostname]['ansible_'~a]['ipv4']['address'] }}
{% endif %}
Expand Down