{"action":"created","issue":{"url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/14","labels_url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/14/comments","events_url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/14/events","html_url":"https://github.com/debops/ansible-dhcpd/issues/14","id":94390107,"number":14,"title":"Undefined variables: 'dict object' has no attribute 'address'","user":{"login":"dkusidlo","id":10347782,"avatar_url":"https://avatars.githubusercontent.com/u/10347782?v=3","gravatar_id":"","url":"https://api.github.com/users/dkusidlo","html_url":"https://github.com/dkusidlo","followers_url":"https://api.github.com/users/dkusidlo/followers","following_url":"https://api.github.com/users/dkusidlo/following{/other_user}","gists_url":"https://api.github.com/users/dkusidlo/gists{/gist_id}","starred_url":"https://api.github.com/users/dkusidlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkusidlo/subscriptions","organizations_url":"https://api.github.com/users/dkusidlo/orgs","repos_url":"https://api.github.com/users/dkusidlo/repos","events_url":"https://api.github.com/users/dkusidlo/events{/privacy}","received_events_url":"https://api.github.com/users/dkusidlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-10T20:53:20Z","updated_at":"2015-07-10T21:25:29Z","closed_at":null,"body":"I'm getting the same error again and again while trying to run the playbook for the first time and didn't manage to solve it on my own. So right now I don't know if it's a bug or I just configured something wrong.\r\n\r\nThe failure:\r\n```\r\n...\r\nTASK: [debops.dhcpd | Configure DHCP server] **********************************\r\nok: [100.126.1.21] => (item=etc/default/isc-dhcp-server)\r\nfatal: [100.126.1.21] => {'msg': \"AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute 'address'\", 'failed': True}\r\nfatal: [100.126.1.21] => {'msg': 'One or more items failed.', 'failed': True, 'changed': False, 'results': [{'group': 'root', 'uid': 0, 'changed': False, 'owner': 'root', 'item': 'etc/default/isc-dhcp-server', 'state': 'file', 'gid': 0, 'mode': '0644', 'invocation': {'module_name': 'template', 'module_args': ''}, 'path': '/etc/default/isc-dhcp-server', 'size': 721}, {'msg': \"AnsibleUndefinedVariable: One or more undefined variables: 'dict object' has no attribute 'address'\", 'failed': True}]}\r\n```\r\n\r\nand the configs:\r\n```\r\n---\r\n# apply debops.dhcpd Role to a target node.\r\n- name: Infrastructure Services [DHCP server]\r\n  hosts: 100.126.1.21\r\n\r\n  vars_files:\r\n    - vars-dhcpd.yml\r\n  roles:\r\n     - debops.dhcpd\r\n```\r\n```\r\n---\r\ndhcpd_mode: 'server'\r\ndhcpd_ipversion: '4'\r\ndhcpd_authoritative: True\r\ndhcpd_interfaces: [eth0]\r\ndhcpd_nameservers: [100.126.2.2]\r\ndhcpd_domain_name: [fmed11.de]\r\n\r\nansible_domain: fmed11.de\r\n\r\n# where to ask for DNS Server / dhcpd_dns_servers\r\nansible_default_ipv4.address: 100.126.1.16\r\n\r\ndhcpd_subnets_local:\r\n  - subnet: '100.126.10.0'\r\n    netmask: '255.255.255.0'\r\n    routers: '100.126.10.2'\r\n    options: |\r\n      default-lease-time 300;\r\n      max-lease-time 7200;\r\n      allow booting;\r\n      allow bootp;\r\n      filename \"pxelinux.0\";\r\n      next-server 100.126.1.21;\r\n    pools:\r\n      - comment: \"default ip pool for common services\"\r\n        range: '100.126.10.115 100.126.10.255'\r\n```\r\n\r\nthanks in advance"},"comment":{"url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/comments/120532939","html_url":"https://github.com/debops/ansible-dhcpd/issues/14#issuecomment-120532939","issue_url":"https://api.github.com/repos/debops/ansible-dhcpd/issues/14","id":120532939,"user":{"login":"drybjed","id":1043958,"avatar_url":"https://avatars.githubusercontent.com/u/1043958?v=3","gravatar_id":"","url":"https://api.github.com/users/drybjed","html_url":"https://github.com/drybjed","followers_url":"https://api.github.com/users/drybjed/followers","following_url":"https://api.github.com/users/drybjed/following{/other_user}","gists_url":"https://api.github.com/users/drybjed/gists{/gist_id}","starred_url":"https://api.github.com/users/drybjed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drybjed/subscriptions","organizations_url":"https://api.github.com/users/drybjed/orgs","repos_url":"https://api.github.com/users/drybjed/repos","events_url":"https://api.github.com/users/drybjed/events{/privacy}","received_events_url":"https://api.github.com/users/drybjed/received_events","type":"User","site_admin":false},"created_at":"2015-07-10T21:25:29Z","updated_at":"2015-07-10T21:25:29Z","body":"It looks like it's a bug in the role, since I get similar error even without setting up anything. Will look at this ASAP, thanks for the bug report."}}