I tried a rewrite and I got to the point with lineinfile where it inserts the total eth0 IP address. However I just can’t seem to get the last octet. I considered a template, but some of the other entries in the file I want to keep such as HWADDR= and think it overkill to have to pull all those items each time when they are pre-populated. As James stated we originally believed we couldn’t pass variables.
Can i get just the last octet with the lineinfile using ansible variables or is my best solution writing out a template?