diff options
author | Justin chi <chigang@huawei.com> | 2018-05-22 12:32:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-05-22 12:32:43 +0000 |
commit | c9bd8b778c698a9fd39764fa0f4275614ecee5a8 (patch) | |
tree | b576b629f0b4f8383e645ed45530802a3173e6e0 /deploy/adapters/ansible | |
parent | e0cc095b31e0285fe318863704b0916a8f88e17d (diff) | |
parent | 7f0439ac27821dbaacda757bde56b3e53f27785c (diff) |
Merge "enable http_proxy in kargo"
Diffstat (limited to 'deploy/adapters/ansible')
3 files changed, 20 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml index b9d9c234..0e253129 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml @@ -125,13 +125,26 @@ regexp: '^#loadbalancer_apiserver_localhost: true' line: 'loadbalancer_apiserver_localhost: true' +- name: enable http proxy + lineinfile: + dest: /opt/kargo_k8s/inventory/group_vars/all.yml + regexp: '^#http_proxy:' + line: 'http_proxy: {{ http_proxy }}' + when: http_proxy != '' + +- name: enable https proxy + lineinfile: + dest: /opt/kargo_k8s/inventory/group_vars/all.yml + regexp: '^#https_proxy:' + line: 'https_proxy: {{ https_proxy }}' + when: https_proxy !='' + - name: use the user name and password login the dashboard lineinfile: dest: /opt/kargo_k8s/inventory/group_vars/k8s-cluster.yml regexp: '^#kube_basic_auth: false' line: 'kube_basic_auth: true' - - name: add vip to ssl keys lineinfile: dest: /opt/kargo_k8s/inventory/group_vars/k8s-cluster.yml diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml index 21287b02..80490955 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/vars/main.yml @@ -4,3 +4,6 @@ apiserver_loadbalancer_domain_name: "{{ public_vip.ip }}" vipaddress: "{{ public_vip.ip }}" exlb_port: 8383 kubelet_fail_swap_on: false + +http_proxy: "{{ proxy }}" +https_proxy: "{{ proxy }}" diff --git a/deploy/adapters/ansible/kubernetes/roles/setup-k8s-network/tasks/RedHat.yml b/deploy/adapters/ansible/kubernetes/roles/setup-k8s-network/tasks/RedHat.yml index 5b434dbe..d32cf238 100644 --- a/deploy/adapters/ansible/kubernetes/roles/setup-k8s-network/tasks/RedHat.yml +++ b/deploy/adapters/ansible/kubernetes/roles/setup-k8s-network/tasks/RedHat.yml @@ -56,6 +56,9 @@ - name: restart the network shell: systemctl restart network +- name: install python lib + shell: yum install -y python-yaml python-netaddr + - name: make sure python lib exist action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" with_items: |