diff --git a/docs/ansible/ansible.md b/docs/ansible/ansible.md index f0c73f25466ee3a0b81e55d4c2447a5c8e1a9a70..a21de529e891fd83e51884ffdd80cf36f451b7fb 100644 --- a/docs/ansible/ansible.md +++ b/docs/ansible/ansible.md @@ -118,7 +118,6 @@ The following tags are defined in playbooks: | local-path-provisioner | Configure External provisioner: local-path | | local-volume-provisioner | Configure External provisioner: local-volume | | macvlan | Network plugin macvlan | -| master (DEPRECATED) | Deprecated - see `control-plane` | | metallb | Installing and configuring metallb | | metrics_server | Configuring metrics_server | | netchecker | Installing netchecker K8s app | diff --git a/playbooks/cluster.yml b/playbooks/cluster.yml index bf9bc98f8ac6a965d93f33a1cb7132a98273ef37..85829ca443a9f0834848886d6b149a8d300c6cb5 100644 --- a/playbooks/cluster.yml +++ b/playbooks/cluster.yml @@ -38,7 +38,7 @@ environment: "{{ proxy_disable_env }}" roles: - { role: kubespray_defaults } - - { role: kubernetes/control-plane, tags: master } + - { role: kubernetes/control-plane, tags: control-plane } - { role: kubernetes/client, tags: client } - { role: kubernetes-apps/cluster_roles, tags: cluster-roles } @@ -75,7 +75,7 @@ environment: "{{ proxy_disable_env }}" roles: - { role: kubespray_defaults } - - { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } + - { role: win_nodes/kubernetes_patch, tags: ["control-plane", "win_nodes"] } - name: Install Kubernetes apps hosts: kube_control_plane diff --git a/roles/etcd/tasks/main.yml b/roles/etcd/tasks/main.yml index 7e8c0f108c86a1856614f229970be7b99a81f113..543eefb3c7a0498afc7f6c76532b265131eef8f5 100644 --- a/roles/etcd/tasks/main.yml +++ b/roles/etcd/tasks/main.yml @@ -39,7 +39,6 @@ - kube_network_plugin != "calico" or calico_datastore == "etcd" - ('k8s_cluster' in group_names) tags: - - master # master tag is deprecated and replaced by control-plane - control-plane - network @@ -51,7 +50,6 @@ - kube_network_plugin != "calico" or calico_datastore == "etcd" - ('k8s_cluster' in group_names) tags: - - master # master tag is deprecated and replaced by control-plane - control-plane - network diff --git a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml index 0ce1758a88bddd9de44027e734bd79dba1ecc771..fbbe064880af9fa66f3c9ff73f2d0f2c7ba0ae63 100644 --- a/roles/kubernetes/preinstall/tasks/0050-create_directories.yml +++ b/roles/kubernetes/preinstall/tasks/0050-create_directories.yml @@ -14,7 +14,6 @@ - bootstrap_os - apps - network - - master # master tag is deprecated and replaced by control-plane - control-plane - node with_items: @@ -38,7 +37,6 @@ - bootstrap_os - apps - network - - master # master tag is deprecated and replaced by control-plane - control-plane - node with_items: diff --git a/roles/validate_inventory/tasks/main.yml b/roles/validate_inventory/tasks/main.yml index 3d6c2cb63c7e080cacb3bfa318000ba1132e83c1..9fedd2faa04de21062e454a11c18e35a3493534b 100644 --- a/roles/validate_inventory/tasks/main.yml +++ b/roles/validate_inventory/tasks/main.yml @@ -1,7 +1,19 @@ --- -# This should only contains check of the inventory itself, nothing depending on facts +# This should only contains check of: +# - the inventory +# - extra variables +# - ansible commandline +# -> nothing depending on facts or similar cluster state # Checks depending on current state (of the nodes or the cluster) # should be in roles/kubernetes/preinstall/tasks/0040-verify-settings.yml +- name: Stop if removed tags are used + assert: + msg: The tag 'master' is removed. Use 'control-plane' instead + that: + - ('master' not in ansible_run_tags) + - ('master' not in ansible_skip_tags) + # TODO: Remove checks after next release + - name: Stop if kube_control_plane group is empty assert: that: groups.get( 'kube_control_plane' )