summaryrefslogtreecommitdiffstats
path: root/vagrant/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant/playbooks')
-rw-r--r--vagrant/playbooks/configure-istio.yml2
-rw-r--r--vagrant/playbooks/configure-krd.yml2
-rw-r--r--vagrant/playbooks/configure-nfd.yml7
-rw-r--r--vagrant/playbooks/configure-virtlet.yml14
4 files changed, 19 insertions, 6 deletions
diff --git a/vagrant/playbooks/configure-istio.yml b/vagrant/playbooks/configure-istio.yml
index e6a138e7..2bd4e853 100644
--- a/vagrant/playbooks/configure-istio.yml
+++ b/vagrant/playbooks/configure-istio.yml
@@ -9,7 +9,6 @@
##############################################################################
- hosts: localhost
- become: yes
pre_tasks:
- name: Load krd variables
include_vars:
@@ -36,6 +35,7 @@
dest: "{{ istio_dest }}"
remote_src: yes
- name: copy istioctl binary to usr/local/bin folder
+ become: yes
command: "mv {{ istio_dest }}/istio-{{ istio_version }}/bin/istioctl /usr/local/bin/"
when: istio_source_type == "tarball"
- name: create network objects
diff --git a/vagrant/playbooks/configure-krd.yml b/vagrant/playbooks/configure-krd.yml
index c8146ed8..22e6419f 100644
--- a/vagrant/playbooks/configure-krd.yml
+++ b/vagrant/playbooks/configure-krd.yml
@@ -12,5 +12,5 @@
tasks:
- name: copy admin.conf file to kube-nodes
copy:
- src: "{{ ansible_env.HOME}}/.kube/config"
+ src: "{{ lookup('env','krd_inventory_folder') }}/artifacts/admin.conf"
dest: "/etc/kubernetes/admin.conf"
diff --git a/vagrant/playbooks/configure-nfd.yml b/vagrant/playbooks/configure-nfd.yml
index 26ad5497..d47a7bcc 100644
--- a/vagrant/playbooks/configure-nfd.yml
+++ b/vagrant/playbooks/configure-nfd.yml
@@ -46,10 +46,13 @@
- node-feature-discovery-daemonset.json.template
- hosts: localhost
- become: yes
+ pre_tasks:
+ - name: Load krd variables
+ include_vars:
+ file: krd-vars.yml
roles:
- role: andrewrothstein.kubectl
- kubectl_ver: "v{{ kubectl_version }}
+ kubectl_ver: "v{{ kubectl_version }}"
tasks:
- name: create service accounts
command: "/usr/local/bin/kubectl apply -f /tmp/{{ item }}"
diff --git a/vagrant/playbooks/configure-virtlet.yml b/vagrant/playbooks/configure-virtlet.yml
index b1dee09f..66deb5cb 100644
--- a/vagrant/playbooks/configure-virtlet.yml
+++ b/vagrant/playbooks/configure-virtlet.yml
@@ -8,7 +8,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
- hosts: localhost
- become: yes
vars:
images_file: /tmp/images.yaml
pre_tasks:
@@ -67,10 +66,12 @@
- name: configure proxy values for docker service
block:
- name: create docker config folder
+ become: yes
file:
state: directory
path: "/etc/systemd/system/docker.service.d"
- name: Configure docker service to use http_proxy env value
+ become: yes
blockinfile:
dest: "/etc/systemd/system/docker.service.d/http-proxy.conf"
create: yes
@@ -80,6 +81,7 @@
when:
- lookup('env','http_proxy') != "fooproxy"
- name: Configure docker service to use https_proxy env value
+ become: yes
blockinfile:
dest: "/etc/systemd/system/docker.service.d/https-proxy.conf"
create: yes
@@ -89,6 +91,7 @@
when:
- lookup('env','https_proxy') != "fooproxy"
- name: Configure docker service to use no_proxy env value
+ become: yes
blockinfile:
dest: "/etc/systemd/system/docker.service.d/no-proxy.conf"
create: yes
@@ -98,8 +101,10 @@
when:
- lookup('env','no_proxy') != "fooproxy"
- name: reload systemd
+ become: yes
command: systemctl daemon-reload
- name: restart docker service
+ become: yes
service:
name: docker
state: restarted
@@ -136,7 +141,6 @@
delay: 10
- hosts: virtlet
- become: yes
tasks:
- name: Load krd variables
include_vars:
@@ -146,18 +150,21 @@
state: directory
path: "{{ criproxy_dest }}"
- name: disable AppArmor in all nodes
+ become: yes
service:
name: apparmor
state: stopped
enabled: no
when: ansible_os_family == "Debian"
- name: modify args for kubelet service
+ become: yes
lineinfile:
dest: /etc/systemd/system/kubelet.service
line: " --container-runtime=remote --container-runtime-endpoint=unix:///run/criproxy.sock --image-service-endpoint=unix:///run/criproxy.sock --enable-controller-attach-detach=false \\"
insertafter: '^ExecStart=/usr/local/bin/kubelet *'
state: present
- name: create dockershim service
+ become: yes
blockinfile:
path: /etc/systemd/system/dockershim.service
create: yes
@@ -210,6 +217,7 @@
path: "{{ criproxy_dest }}/criproxy"
mode: "+x"
- name: create criproxy service
+ become: yes
blockinfile:
path: /etc/systemd/system/criproxy.service
create: yes
@@ -226,6 +234,7 @@
[Install]
WantedBy=kubelet.service
- name: start criproxy and dockershim services
+ become: yes
service:
name: "{{ item }}"
state: started
@@ -234,6 +243,7 @@
- dockershim
- criproxy
- name: restart kubelet services
+ become: yes
service:
name: kubelet
state: restarted