CentOS 7.4 vagrant box is now available so re-enabling this scenario.
For more info:
https://seven.centos.org/2017/09/updated-centos-vagrant-images-available-v1708-01/
Signed-off-by: Sébastien Han <seb@redhat.com>
# as an iscsi target portal ip. The list must be comma separated - and the order determines
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
# gateways can be added, but the order must *not* be changed.
-#gateway_ip_list: "192.168.122.101,192.168.122.102,192.168.122.103"
+#gateway_ip_list: 0.0.0.0
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
# If the rbd does not exist, it will be created for you. In addition you may increase the
# to any client, and the remove it from LIO and then delete the rbd image
#
# NB. this variable definition can be commented out to bypass LUN management
+#
+# Example:
+#
#rbd_devices:
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
+#rbd_devices: {}
# client_connections defines the client ACL's to restrict client access to specific LUNs
# - status shows the intended state of this client definition - 'present' or 'absent'
#
# NB. this definition can be commented out to skip client (nodeACL) management
+#
+# Example:
+#
#client_connections:
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
+#client_connections: {}
+
- nfs_group_name in group_names
- nfs_ganesha_dev
+- name: set_fact ceph_iscsi_repos
+ set_fact:
+ ceph_iscsi_repos:
+ - ceph-iscsi-config
+ - tcmu-runner
+ when:
+ - ceph_iscsi_config_dev
+ - iscsi_gw_group_name in group_names
+
- name: fetch ceph-iscsi-config red hat development repository
uri:
- url: https://shaman.ceph.com/api/repos/ceph-iscsi-config/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo
+ url: https://shaman.ceph.com/api/repos/{{ item }}/{{ ceph_dev_branch }}/{{ ceph_dev_sha1 }}/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}/repo
return_content: yes
register: ceph_iscsi_config_dev_yum_repo
+ with_items: "{{ ceph_iscsi_repos }}"
when:
- ceph_iscsi_config_dev
- iscsi_gw_group_name in group_names
- name: configure ceph-iscsi-config red hat development repository
copy:
- content: "{{ ceph_iscsi_config_dev_yum_repo.content }}"
- dest: /etc/yum.repos.d/ceph-iscsi-config-dev.repo
+ content: "{{ item.0.content }}"
+ dest: "/etc/yum.repos.d/{{ item.1 }}-dev.repo"
owner: root
group: root
backup: yes
+ with_together:
+ - "{{ ceph_iscsi_config_dev_yum_repo.results }}"
+ - "{{ ceph_iscsi_repos }}"
when:
- ceph_iscsi_config_dev
- iscsi_gw_group_name in group_names
# as an iscsi target portal ip. The list must be comma separated - and the order determines
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
# gateways can be added, but the order must *not* be changed.
-gateway_ip_list: "192.168.122.101,192.168.122.102,192.168.122.103"
+gateway_ip_list: 0.0.0.0
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
# If the rbd does not exist, it will be created for you. In addition you may increase the
# to any client, and the remove it from LIO and then delete the rbd image
#
# NB. this variable definition can be commented out to bypass LUN management
-rbd_devices:
- - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
- - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
- - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
- - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
+#
+# Example:
+#
+#rbd_devices:
+# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
+# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
+# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
+# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
+rbd_devices: {}
# client_connections defines the client ACL's to restrict client access to specific LUNs
# - status shows the intended state of this client definition - 'present' or 'absent'
#
# NB. this definition can be commented out to skip client (nodeACL) management
-client_connections:
- - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
- - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
+#
+# Example:
+#
+#client_connections:
+# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
+# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
+
+client_connections: {}
--- /dev/null
+---
+- name: make sure gateway_ip_list is configured
+ fail:
+ msg: "you must set a list of IPs (comma separated) for gateway_ip_list"
+ when:
+ - gateway_ip_list == "0.0.0.0"
size: "{{ item.size }}"
host: "{{ item.host }}"
state: "{{ item.state }}"
- with_items: "{{ rbd_devices|default([]) }}"
+ with_items: "{{ rbd_devices }}"
register: images
- name: igw_gateway (map) | map luns to the iscsi target
image_list: "{{ item.image_list }}"
chap: "{{ item.chap }}"
state: "{{ item.status }}"
- with_items: "{{ client_connections|default([]) }}"
+ with_items: "{{ client_connections }}"
register: clients
- "{{ crt_files_exist.results }}"
when: item.1.stat.exists == true
+- name: set_fact generate_crt
+ set_fact:
+ generate_crt: true
+ with_items: "{{ crt_files_exist.results }}"
+ when: item.stat.exists == false
+
- name: include generate_crt.yml
include: generate_crt.yml
- with_together:
- - "{{ crt_files }}"
- - "{{ crt_files_exist.results }}"
- when: item.1.stat.exists == false
+ when: generate_crt|bool|default(false)
---
+- name: check_mandatory_vars.yml
+ include: check_mandatory_vars.yml
+
- name: include prerequisites.yml
include: prerequisites.yml
copy:
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring"
dest: "/etc/ceph/{{ cluster }}.client.admin.keyring"
- owner: "ceph"
- group: "ceph"
+ owner: "root"
+ group: "root"
mode: "0600"
when:
- cephx
[config]
cluster_name = {{ cluster }}
-gateway_keyring = /etc/ceph/{{ cluster }}.client.admin.keyring
+gateway_keyring = {{ cluster }}.client.admin.keyring
# Optional settings related to the CLI/API service
--- /dev/null
+---
+gateway_ip_list: 192.168.1.90
[rbdmirrors]
ceph-rbd-mirror0
-#[iscsi_gws]
-#ceph-iscsi-gw0 ceph_repository="dev"
+[iscsi_gws]
+ceph-iscsi-gw0 ceph_repository="dev"
nfs_vms: 1
rbd_mirror_vms: 1
client_vms: 1
-iscsi_gw_vms: 0
+iscsi_gw_vms: 1
mgr_vms: 1
# Deploy RESTAPI on each of the Monitors