diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-11-12 10:42:39 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-11-12 10:42:39 -0500 |
commit | 5ed42612965d72b87638ebe2fa96bec89199c4fa (patch) | |
tree | c58b76b1a9b42ee4adba2a07d5917e519fef9691 /roles/kube_nfs_volumes | |
parent | 7869fb8c26a96c1e0ee74b930fd0da8a9952cb52 (diff) | |
parent | 597ba24415d6b7faa7ca02d200c8aed3c08b925a (diff) | |
download | openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.gz openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.bz2 openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.xz openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.zip |
Merge pull request #878 from openshift/master
Master to prod
Diffstat (limited to 'roles/kube_nfs_volumes')
-rw-r--r-- | roles/kube_nfs_volumes/README.md | 3 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/defaults/main.yml | 6 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/tasks/main.yml | 13 | ||||
l--------- | roles/kube_nfs_volumes/templates/v1/nfs.json.j2 | 1 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 (renamed from roles/kube_nfs_volumes/templates/nfs.json.j2) | 0 |
5 files changed, 17 insertions, 6 deletions
diff --git a/roles/kube_nfs_volumes/README.md b/roles/kube_nfs_volumes/README.md index 56c69c286..1520f79b2 100644 --- a/roles/kube_nfs_volumes/README.md +++ b/roles/kube_nfs_volumes/README.md @@ -44,6 +44,9 @@ kubernetes_url: https://10.245.1.2:6443 # Token to use for authentication to the API server kubernetes_token: tJdce6Fn3cL1112YoIJ5m2exzAbzcPZX + +# API Version to use for kubernetes +kube_api_version: v1 ``` ## Dependencies diff --git a/roles/kube_nfs_volumes/defaults/main.yml b/roles/kube_nfs_volumes/defaults/main.yml index e296492f9..bdd994d07 100644 --- a/roles/kube_nfs_volumes/defaults/main.yml +++ b/roles/kube_nfs_volumes/defaults/main.yml @@ -1,4 +1,10 @@ --- +kubernetes_url: https://172.30.0.1:443 + +kube_api_version: v1 + +kube_req_template: "../templates/{{ kube_api_version }}/nfs.json.j2" + # Options of NFS exports. nfs_export_options: "*(rw,no_root_squash,insecure,no_subtree_check)" diff --git a/roles/kube_nfs_volumes/tasks/main.yml b/roles/kube_nfs_volumes/tasks/main.yml index f4a506234..d1dcf261a 100644 --- a/roles/kube_nfs_volumes/tasks/main.yml +++ b/roles/kube_nfs_volumes/tasks/main.yml @@ -16,10 +16,11 @@ - include: nfs.yml - name: export physical volumes - uri: url={{ kubernetes_url }}/api/v1beta3/persistentvolumes - method=POST - body='{{ lookup("template", "../templates/nfs.json.j2") }}' - body_format=json - status_code=201 - HEADER_Authorization="Bearer {{ kubernetes_token }}" + uri: + url: "{{ kubernetes_url }}/api/{{ kube_api_version }}/persistentvolumes" + method: POST + body: "{{ lookup('template', kube_req_template) }}" + body_format: json + status_code: 201 + HEADER_Authorization: "Bearer {{ kubernetes_token }}" with_items: partition_pool diff --git a/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 b/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 new file mode 120000 index 000000000..49c1191bc --- /dev/null +++ b/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 @@ -0,0 +1 @@ +../v1beta3/nfs.json.j2
\ No newline at end of file diff --git a/roles/kube_nfs_volumes/templates/nfs.json.j2 b/roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 index b42886ef1..b42886ef1 100644 --- a/roles/kube_nfs_volumes/templates/nfs.json.j2 +++ b/roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 |