Skip to content

Commit 76dd3f2

Browse files
committed
Custom facts
1 parent 971b38d commit 76dd3f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v1.14 ????-??-??
1+
v1.14 2016-04-23
22

33
- Look for ansible.cfg and use hostfile setting.
44
- html_fancy: Properly sort vcpu and ram columns.
@@ -7,6 +7,7 @@ v1.14 ????-??-??
77
collected.
88
- html_fancy: support for facter and custom facts.
99
- html_fancy: Hide sections if there are no items for it.
10+
- html_fancy: Improvements in the rendering of custom variables.
1011
- Apply Dynamic Inventory vars to all hostnames in the group.
1112
- Many minor bugfixes.
1213

example/out/custfact.test.local

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ansible_facts": {"ansible_all_ipv4_addresses": ["192.168.56.7"], "ansible_all_ipv6_addresses": ["fe80::a00:27ff:fecb:74d1"], "ansible_architecture": "x86_64", "ansible_bios_date": "12/01/2006", "ansible_bios_version": "VirtualBox", "ansible_cmdline": {"BOOT_IMAGE": "/vmlinuz-3.13.0-32-generic", "ro": true, "root": "/dev/mapper/ubuntu1404--vg-root"}, "ansible_date_time": {"date": "2016-04-18", "day": "18", "epoch": "1460981689", "hour": "14", "iso8601": "2016-04-18T12:14:49Z", "iso8601_basic": "20160418T141449658125", "iso8601_basic_short": "20160418T141449", "iso8601_micro": "2016-04-18T12:14:49.658189Z", "minute": "14", "month": "04", "second": "49", "time": "14:14:49", "tz": "CEST", "tz_offset": "+0200", "weekday": "Monday", "weekday_number": "1", "weeknumber": "16", "year": "2016"}, "ansible_default_ipv4": {"address": "192.168.56.7", "alias": "eth0", "broadcast": "192.168.56.255", "gateway": "192.168.56.1", "interface": "eth0", "macaddress": "08:00:27:cb:74:d1", "mtu": 1500, "netmask": "255.255.255.0", "network": "192.168.56.0", "type": "ether"}, "ansible_default_ipv6": {}, "ansible_devices": {"sda": {"holders": [], "host": "SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)", "model": "VBOX HARDDISK", "partitions": {"sda1": {"sectors": "497664", "sectorsize": 512, "size": "243.00 MB", "start": "2048"}, "sda2": {"sectors": "2", "sectorsize": 512, "size": "1.00 KB", "start": "501758"}, "sda5": {"sectors": "167268352", "sectorsize": 512, "size": "79.76 GB", "start": "501760"}}, "removable": "0", "rotational": "1", "scheduler_mode": "deadline", "sectors": "167772160", "sectorsize": "512", "size": "80.00 GB", "support_discard": "0", "vendor": "ATA"}, "sr0": {"holders": [], "host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)", "model": "CD-ROM", "partitions": {}, "removable": "1", "rotational": "1", "scheduler_mode": "deadline", "sectors": "2097151", "sectorsize": "512", "size": "1024.00 MB", "support_discard": "0", "vendor": "VBOX"}}, "ansible_distribution": "Ubuntu", "ansible_distribution_major_version": "14", "ansible_distribution_release": "trusty", "ansible_distribution_version": "14.04", "ansible_dns": {"nameservers": ["8.8.8.8"]}, "ansible_domain": "", "ansible_env": {"EDITOR": "vim", "GDK_USE_XFT": "1", "HOME": "/home/fboender", "LANG": "en_US.UTF-8", "LANGUAGE": "en_US.UTF-8", "LC_ALL": "en_US.UTF-8", "LC_MESSAGES": "en_US.UTF-8", "LESS": "-RgiMSx4 -FX", "LOGNAME": "fboender", "LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36::ow=103;30;01:", "PAGER": "less", "PATH": "~/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:~/bin/:", "PWD": "/home/fboender", "SHELL": "/bin/bash", "SHLVL": "1", "SSH_CLIENT": "192.168.56.1 57684 22", "SSH_CONNECTION": "192.168.56.1 57684 192.168.56.7 22", "SSH_TTY": "/dev/pts/1", "TERM": "xterm", "TNS_ADMIN": "/usr/local/lib/instantclient_10_2/network/admin/", "USER": "fboender", "XDG_RUNTIME_DIR": "/run/user/1000", "XDG_SESSION_ID": "16", "_": "/usr/bin/python"}, "ansible_eth0": {"active": true, "device": "eth0", "ipv4": {"address": "192.168.56.7", "broadcast": "192.168.56.255", "netmask": "255.255.255.0", "network": "192.168.56.0"}, "ipv6": [{"address": "fe80::a00:27ff:fecb:74d1", "prefix": "64", "scope": "link"}], "macaddress": "08:00:27:cb:74:d1", "module": "e1000", "mtu": 1500, "pciid": "0000:00:03.0", "promisc": false, "type": "ether"}, "ansible_fips": false, "ansible_form_factor": "Other", "ansible_fqdn": "ubuntu1404", "ansible_hostname": "ubuntu1404", "ansible_interfaces": ["lo", "eth0"], "ansible_kernel": "3.13.0-32-generic", "ansible_lo": {"active": true, "device": "lo", "ipv4": {"address": "127.0.0.1", "broadcast": "host", "netmask": "255.0.0.0", "network": "127.0.0.0"}, "ipv6": [{"address": "::1", "prefix": "128", "scope": "host"}], "mtu": 65536, "promisc": false, "type": "loopback"}, "ansible_lsb": {"codename": "trusty", "description": "Ubuntu 14.04.4 LTS", "id": "Ubuntu", "major_release": "14", "release": "14.04"}, "ansible_machine": "x86_64", "ansible_machine_id": "806f49dd06f05eddefe5f6f8541c9f85", "ansible_memfree_mb": 732, "ansible_memory_mb": {"nocache": {"free": 925, "used": 69}, "real": {"free": 732, "total": 994, "used": 262}, "swap": {"cached": 0, "free": 1019, "total": 1019, "used": 0}}, "ansible_memtotal_mb": 994, "ansible_mounts": [{"device": "/dev/mapper/ubuntu1404--vg-root", "fstype": "ext4", "mount": "/", "options": "rw,errors=remount-ro", "size_available": 77096124416, "size_total": 83062685696, "uuid": ""}, {"device": "/dev/sda1", "fstype": "ext2", "mount": "/boot", "options": "rw", "size_available": 193630208, "size_total": 246755328, "uuid": ""}], "ansible_nodename": "ubuntu1404", "ansible_os_family": "Debian", "ansible_pkg_mgr": "apt", "ansible_processor": ["GenuineIntel", "Intel(R) Core(TM) i7-4712HQ CPU @ 2.30GHz"], "ansible_processor_cores": 1, "ansible_processor_count": 1, "ansible_processor_threads_per_core": 1, "ansible_processor_vcpus": 1, "ansible_product_name": "VirtualBox", "ansible_product_serial": "NA", "ansible_product_uuid": "NA", "ansible_product_version": "1.2", "ansible_python_version": "2.7.6", "ansible_selinux": false, "ansible_service_mgr": "upstart", "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBALVWhwJTuUOmtAlk/pX3Di0OJwFb+RI4ML775RaiTtlr1pA3TREjBsY0sI30e/5kaEumJoJY6RpKxj0qIZmxKxD+6RyoScHGZa+TncnDu5ZZ0tSEwhOmFmgJSkewTszzofi8qWPXwgcpAGqHyUQjxmUAx1Wt4AjGgMWvJUxULKwdAAAAFQDq6P94vNLTK10ScJnpF/fK513WnQAAAIAxWA6ZYRw69rcYLZuLE1Cx141uOVsVQXq4RZM4aZwzIpV6uluaEccL0Zw0hRJrC0Jr3o0K+VBoKQIpFDqCOG1/6hstvON6gI6nPCzr4JbZlrWibbPoduEtXkAq51Vsz0kPRWe2VBlj0TUscC0aarm7qJMlHUdn9erAlHRYYW00EgAAAIAvzNKm4DQt98asqBAoklEfTWLfgWcGwqJeUwO8N+5NQ6ycz8esmTGu/J1/HG4BxKFkj24U7Z6P/AAMy0xS8QmU9yWQsx3/3OuSsghqV9UV0IpQqVCKTN11xXkWaZ7hBqMbS6ZEJI4mQarHzag7o2pwLLzFfEI5i7BMlh2DsIz8Rw==", "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJKEZN7MJ32SKg4LeQDdQ8Tw1GUL/IiWjTYgsXFpyd9y56k4Er8/MRkKUdP2GzJUD20RSrEjW0bbL1SpIq2Uoy8=", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIHfGjsGm+bDO4e9FNfZ8VTyUONhQ1jkZZuZpigM7eMg7", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDMSG+fWyec8/NmNBNS+5QaYjiJdNxzZ/ARaKedBDpKuWYRTqwEl2sLjQY6x8UNfs82IwZYFtfPBmI5mklR1DbAdLoxz6zESiIagg2uSF9mO+x2AqLcFciwPFgrFBGbIvufbg4o0BidBUbtvqde0qIzyCf598BMLJ0FDLpKi50n1pcTaM5bodgo7j15x5ubtLWHyXMCYSJYtj66qi7+6XbtIovn7pgwKavbbwUTVmzT2rRyK2yC+mF3q1mVdzxe7dG1XOTjI8TFTLicItki5KccTc4OMVOcpahNyDvXXE50X1IuHNCuGUdworIFe9Nlti92egAh4gx9ubjh8byow2Y5", "ansible_swapfree_mb": 1019, "ansible_swaptotal_mb": 1019, "ansible_system": "Linux", "ansible_system_vendor": "innotek GmbH", "ansible_uptime_seconds": 1094, "ansible_user_dir": "/home/fboender", "ansible_user_gecos": "fboender,,,", "ansible_user_gid": 1000, "ansible_user_id": "fboender", "ansible_user_shell": "/bin/bash", "ansible_user_uid": 1000, "ansible_userspace_architecture": "x86_64", "ansible_userspace_bits": "64", "ansible_virtualization_role": "guest", "ansible_virtualization_type": "virtualbox", "module_setup": true}, "changed": false}

0 commit comments

Comments
 (0)