You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
3.1 KiB

  1. ---
  2. # Disable swap
  3. - name: Disable swap
  4. import_tasks: 0010-swapoff.yml
  5. when:
  6. - not dns_late
  7. - kubelet_fail_swap_on
  8. - name: Set facts
  9. import_tasks: 0020-set_facts.yml
  10. tags:
  11. - resolvconf
  12. - facts
  13. - name: Check settings
  14. import_tasks: 0040-verify-settings.yml
  15. when:
  16. - not dns_late
  17. tags:
  18. - asserts
  19. - name: Create directories
  20. import_tasks: 0050-create_directories.yml
  21. when:
  22. - not dns_late
  23. - name: Apply resolvconf settings
  24. import_tasks: 0060-resolvconf.yml
  25. when:
  26. - dns_mode != 'none'
  27. - resolvconf_mode == 'host_resolvconf'
  28. - systemd_resolved_enabled.rc != 0
  29. - networkmanager_enabled.rc != 0
  30. tags:
  31. - bootstrap-os
  32. - resolvconf
  33. - name: Apply systemd-resolved settings
  34. import_tasks: 0061-systemd-resolved.yml
  35. when:
  36. - dns_mode != 'none'
  37. - resolvconf_mode == 'host_resolvconf'
  38. - systemd_resolved_enabled.rc == 0
  39. tags:
  40. - bootstrap-os
  41. - resolvconf
  42. - name: Apply networkmanager unmanaged devices settings
  43. import_tasks: 0062-networkmanager-unmanaged-devices.yml
  44. when:
  45. - networkmanager_enabled.rc == 0
  46. tags:
  47. - bootstrap-os
  48. - name: Apply networkmanager DNS settings
  49. import_tasks: 0063-networkmanager-dns.yml
  50. when:
  51. - dns_mode != 'none'
  52. - resolvconf_mode == 'host_resolvconf'
  53. - networkmanager_enabled.rc == 0
  54. tags:
  55. - bootstrap-os
  56. - resolvconf
  57. - name: Install required system packages
  58. import_tasks: 0070-system-packages.yml
  59. when:
  60. - not dns_late
  61. tags:
  62. - bootstrap-os
  63. - system-packages
  64. - name: Apply system configurations
  65. import_tasks: 0080-system-configurations.yml
  66. when:
  67. - not dns_late
  68. tags:
  69. - bootstrap-os
  70. - name: Configure NTP
  71. import_tasks: 0081-ntp-configurations.yml
  72. when:
  73. - not dns_late
  74. - ntp_enabled
  75. tags:
  76. - bootstrap-os
  77. - name: Configure /etc/hosts
  78. import_tasks: 0090-etchosts.yml
  79. tags:
  80. - bootstrap-os
  81. - etchosts
  82. - name: Configure dhclient
  83. import_tasks: 0100-dhclient-hooks.yml
  84. when:
  85. - dns_mode != 'none'
  86. - resolvconf_mode == 'host_resolvconf'
  87. - dhclientconffile is defined
  88. - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
  89. tags:
  90. - bootstrap-os
  91. - resolvconf
  92. - name: Configure dhclient dhclient hooks
  93. import_tasks: 0110-dhclient-hooks-undo.yml
  94. when:
  95. - dns_mode != 'none'
  96. - resolvconf_mode != 'host_resolvconf'
  97. - dhclientconffile is defined
  98. - not ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"]
  99. tags:
  100. - bootstrap-os
  101. - resolvconf
  102. # We need to make sure the network is restarted early enough so that docker can later pick up the correct system
  103. # nameservers and search domains
  104. - name: Flush handlers
  105. meta: flush_handlers
  106. - name: Check if we are running inside a Azure VM
  107. stat:
  108. path: /var/lib/waagent/
  109. get_attributes: false
  110. get_checksum: false
  111. get_mime: false
  112. register: azure_check
  113. when:
  114. - not dns_late
  115. tags:
  116. - bootstrap-os
  117. - name: Run calico checks
  118. include_role:
  119. name: network_plugin/calico
  120. tasks_from: check
  121. when:
  122. - kube_network_plugin == 'calico'
  123. - not ignore_assert_errors