main.yml 939 B

123456789101112131415161718192021222324252627
  1. ---
  2. # Adds idm.lab.example.com as alias for workstation, and sso.lab.example.com as
  3. # alias for utility to /etc/hosts. Must be executed on bastion.lab.example.com
  4. #
  5. # Basically there are two line with workstation/utility IPs there...
  6. #
  7. # 172.25.250.9 workstation.lab.example.com workstation
  8. # 172.25.250.253 utility.lab.example.com utility
  9. #
  10. # And it must have the above hostnames added, theen dnsmasq restarted.
  11. - name: Make sure idm is in /etc/hosts
  12. ansible.builtin.lineinfile:
  13. path: /etc/hosts
  14. regexp: '^172.25.250.9\s+'
  15. line: "172.25.250.9 workstation.lab.example.com workstation idm.lab.example.com"
  16. state: present
  17. notify:
  18. - Restart dnsmasq
  19. - name: Make sure sso is in /etc/hosts
  20. ansible.builtin.lineinfile:
  21. path: /etc/hosts
  22. regexp: '^172.25.250.253\s+'
  23. line: "172.25.250.253 utility.lab.example.com utility sso.lab.example.com"
  24. state: present
  25. notify:
  26. - Restart dnsmasq
  27. ...