dnsmasq_install.yml 807 B

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - name: Check for NetworkManager service
  3. command: >
  4. systemctl show NetworkManager
  5. register: nm_show
  6. changed_when: false
  7. ignore_errors: True
  8. - name: Set fact using_network_manager
  9. set_fact:
  10. network_manager_active: "{{ True if 'ActiveState=active' in nm_show.stdout else False }}"
  11. - name: Install dnsmasq
  12. package:
  13. name: dnsmasq
  14. state: installed
  15. when: not openshift_is_atomic | bool
  16. register: result
  17. until: result is succeeded
  18. - name: ensure origin/node directory exists
  19. file:
  20. state: directory
  21. path: "{{ item }}"
  22. owner: root
  23. group: root
  24. mode: '0700'
  25. with_items:
  26. - /etc/origin
  27. - /etc/origin/node
  28. # Relies on ansible in order to configure static config
  29. - import_tasks: dnsmasq/no-network-manager.yml
  30. when: not network_manager_active | bool