69 строки
2.0 KiB
YAML
69 строки
2.0 KiB
YAML
---
|
|
- hosts: masters
|
|
gather_facts: no
|
|
serial: 1
|
|
become: yes
|
|
vars:
|
|
azure_conf_dir: /etc/azure
|
|
azure_conf: "{{ azure_conf_dir }}/azure.conf"
|
|
master_conf: /etc/origin/master/master-config.yaml
|
|
handlers:
|
|
- name: restart atomic-openshift-master-api
|
|
systemd:
|
|
state: restarted
|
|
name: atomic-openshift-master-api
|
|
|
|
- name: restart atomic-openshift-master-controllers
|
|
systemd:
|
|
state: restarted
|
|
name: atomic-openshift-master-controllers
|
|
|
|
post_tasks:
|
|
- name: make sure /etc/azure exists
|
|
file:
|
|
state: directory
|
|
path: "{{ azure_conf_dir }}"
|
|
|
|
- name: populate /etc/azure/azure.conf
|
|
copy:
|
|
dest: "{{ azure_conf }}"
|
|
content: |
|
|
{
|
|
"aadClientId": "{{ lookup('env','AADCLIENTID') }}",
|
|
"aadClientSecret": "{{ lookup('env','AADCLIENTSECRET') }}",
|
|
"aadTenantId": "{{ lookup('env','TENANTID') }}",
|
|
"subscriptionId": "{{ lookup('env','SUBSCRIPTIONID') }}",
|
|
"tenantId": "{{ lookup('env','TENANTID') }}",
|
|
"resourceGroup": "{{ lookup('env','RESOURCEGROUP') }}",
|
|
"location": "{{ lookup('env','LOCATION') }}",
|
|
"cloud": "{{ lookup('env','CLOUDNAME')}}"
|
|
}
|
|
notify:
|
|
- restart atomic-openshift-master-api
|
|
- restart atomic-openshift-master-controllers
|
|
|
|
- name: insert the azure disk config into the master
|
|
modify_yaml:
|
|
dest: "{{ master_conf }}"
|
|
yaml_key: "{{ item.key }}"
|
|
yaml_value: "{{ item.value }}"
|
|
with_items:
|
|
- key: kubernetesMasterConfig.apiServerArguments.cloud-config
|
|
value:
|
|
- "{{ azure_conf }}"
|
|
|
|
- key: kubernetesMasterConfig.apiServerArguments.cloud-provider
|
|
value:
|
|
- azure
|
|
|
|
- key: kubernetesMasterConfig.controllerArguments.cloud-config
|
|
value:
|
|
- "{{ azure_conf }}"
|
|
|
|
- key: kubernetesMasterConfig.controllerArguments.cloud-provider
|
|
value:
|
|
- azure
|
|
notify:
|
|
- restart atomic-openshift-master-api
|
|
- restart atomic-openshift-master-controllers
|