Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v2.28.0
  • v2.27.0
  • v2.25.1
  • v2.24.3
  • v2.26.0
  • v2.24.2
  • v2.25.0
  • v2.24.1
  • v2.22.2
  • v2.23.3
  • v2.24.0
  • v2.23.2
  • v2.23.1
  • v2.23.0
  • v2.22.1
  • v2.22.0
  • v2.21.0
  • v2.20.0
  • v2.19.1
  • v2.18.2
21 results

cluster.yml

Blame
  • cluster.yml 3.74 KiB
    ---
    - hosts: localhost
      gather_facts: false
      become: no
      tasks:
        - name: "Check ansible version >=2.7.8"
          assert:
            msg: "Ansible must be v2.7.8 or higher"
            that:
              - ansible_version.string is version("2.7.8", ">=")
          tags:
            - check
      vars:
        ansible_connection: local
    
    - hosts: bastion[0]
      gather_facts: False
      roles:
        - { role: kubespray-defaults}
        - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
    
    - hosts: k8s-cluster:etcd
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      gather_facts: false
      roles:
        - { role: kubespray-defaults}
        - { role: bootstrap-os, tags: bootstrap-os}
    
    - hosts: k8s-cluster:etcd
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      roles:
        - { role: kubespray-defaults}
        - { role: kubernetes/preinstall, tags: preinstall }
        - { role: "container-engine", tags: "container-engine", when: deploy_container_engine|default(true) }
        - { role: download, tags: download, when: "not skip_downloads" }
      environment: "{{ proxy_env }}"
    
    - hosts: etcd
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      roles:
        - { role: kubespray-defaults}
        - role: etcd
          tags: etcd
          vars:
            etcd_cluster_setup: true
            etcd_events_cluster_setup: "{{ etcd_events_cluster_enabled }}"
          when: not etcd_kubeadm_enabled| default(false)
    
    - hosts: k8s-cluster
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      roles:
        - { role: kubespray-defaults}
        - role: etcd
          tags: etcd
          vars:
            etcd_cluster_setup: false
            etcd_events_cluster_setup: false
          when: not etcd_kubeadm_enabled| default(false)
    
    - hosts: k8s-cluster
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      roles:
        - { role: kubespray-defaults}
        - { role: kubernetes/node, tags: node }
      environment: "{{ proxy_env }}"
    
    - hosts: kube-master
      any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
      roles:
        - { role: kubespray-defaults}