/opt/cni: file.directory: - user: root - group: root - mode: 755 - makedirs: True /etc/cni/net.d: file.directory: - user: root - group: root - mode: 755 - makedirs: True # These are all available CNI network plugins. cni-tar: archive: - extracted - user: root - name: /opt/cni - makedirs: True - source: https://storage.googleapis.com/kubernetes-release/network-plugins/cni-8a936732094c0941e1543ef5d292a1f4fffa1ac5.tar.gz - tar_options: v - source_hash: md5=ae7ec24d2ffc0fd14a15f527744ba2c3 - archive_format: tar - if_missing: /opt/cni/bin {% if grains['cloud'] is defined and grains.cloud in [ 'vagrant' ] %} # Install local CNI network plugins in a Vagrant environment cmd-local-cni-plugins: cmd.run: - name: | cp -v /vagrant/cluster/network-plugins/cni/bin/* /opt/cni/bin/. chmod +x /opt/cni/bin/* cmd-local-cni-config: cmd.run: - name: | cp -v /vagrant/cluster/network-plugins/cni/config/* /etc/cni/net.d/. chown root:root /etc/cni/net.d/* chmod 744 /etc/cni/net.d/* {% endif -%}