I want this module to run locally on a host i delegate_to
- name: Add Host to dhcp config
local_action:
module: lineinfile
dest: /etc/dhcp/dhcpd.conf
line: “host {{ inventory_hostname}} {hardware ethernet {{ macaddress }};fixed-address {{ inventory_hostname}}; }”
notify: restart dhcpd
delegate_to: anarbitraryhost
Doesn’t seem to work - are local_action and delegate_to mutually exclusive?