Generate Kubespray artifacts on undercloud
Write kubectl binary and admin.conf file on undercloud. Change-Id: I5dd6ad0f69a12c984b1c5b7c2735bc301f8cb763
This commit is contained in:
parent
d77327d6e2
commit
215515e788
@ -61,10 +61,13 @@ outputs:
|
||||
- name: kubernetes_master step 2
|
||||
when: step == '2'
|
||||
block:
|
||||
- name: create kubespray temp dir
|
||||
- name: create kubespray temp dirs
|
||||
file:
|
||||
path: "{{playbook_dir}}/kubespray"
|
||||
path: "{{item}}"
|
||||
state: directory
|
||||
with_items:
|
||||
- "{{playbook_dir}}/kubespray"
|
||||
- "{{playbook_dir}}/kubespray/artifacts"
|
||||
- name: generate kubespray inventory
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/kubespray/inventory"
|
||||
@ -87,10 +90,18 @@ outputs:
|
||||
etcd:
|
||||
children:
|
||||
kube-master: {}
|
||||
|
||||
k8s-cluster:
|
||||
children:
|
||||
kube-master: {}
|
||||
kube-node: {}
|
||||
- name: generate kubespray global vars
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/kubespray/global_vars.yml"
|
||||
content: |
|
||||
kubeconfig_localhost: true
|
||||
kubectl_localhost: true
|
||||
artifacts_dir: '{{playbook_dir}}/kubespray/artifacts'
|
||||
- name: generate kubespray playbook
|
||||
copy:
|
||||
dest: "{{playbook_dir}}/kubespray/playbook.yml"
|
||||
@ -127,6 +138,7 @@ outputs:
|
||||
-b
|
||||
-i '{{playbook_dir}}/kubespray/inventory'
|
||||
--skip-tags docker,bastion-ssh-config
|
||||
--extra-vars '@{{playbook_dir}}/kubespray/global_vars.yml'
|
||||
'{{playbook_dir}}/kubespray/playbook.yml'
|
||||
{%- endif -%}
|
||||
- name: print kubespray command
|
||||
|
Loading…
Reference in New Issue
Block a user