Skip to content

Instantly share code, notes, and snippets.

@meysam81
Created January 27, 2024 09:35
Show Gist options
  • Save meysam81/1b4c20fbb59fb1f6e791f7bcebe7c604 to your computer and use it in GitHub Desktop.
Save meysam81/1b4c20fbb59fb1f6e791f7bcebe7c604 to your computer and use it in GitHub Desktop.
Passing vars files to the controlplane configuration
- name: Bootstrap Kubernetes Control plane
hosts: node0
become: true
gather_facts: true
vars_files:
- "{{ playbook_dir }}/vars/etcd.yml"
- "{{ playbook_dir }}/vars/k8s.yml"
- "{{ playbook_dir }}/vars/tls.yml"
tasks:
# ... truncated ...
- name: Import kubeconfig role
ansible.builtin.include_role:
name: kubeconfig
vars:
is_controlplane: true
# ... truncated ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment