diff --git a/.travis.yml b/.travis.yml index 05e0149..82376d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,6 @@ env: jobs: allow_failures: - - env: MOLECULE_SCENARIO_NAME="ubuntu-20.04" - env: MOLECULE_SCENARIO_NAME="ubuntu-19.10" - env: MOLECULE_SCENARIO_NAME="centos-8" - env: MOLECULE_SCENARIO_NAME="centos-7" diff --git a/defaults/main.yml b/defaults/main.yml index 948065c..ba9eac0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,7 +15,7 @@ # limitations under the License. # Ceph version. -ceph_release: "14.2" +ceph_release: "15.2" # Ceph rgw configs. ceph_rgw_config: diff --git a/handlers/main.yml b/handlers/main.yml index 4f6766c..63791ad 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -20,7 +20,7 @@ changed_when: false ignore_errors: true -- name: ceph_rgw | systemctl restart +- name: ceph_rgw | systemctl restart ceph-radosgw.target service: name: "ceph-radosgw.target" state: "restarted" diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 94016e5..e6bafa0 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu:18.04 +FROM ubuntu:20.04 ENV LANG "en_US.utf8" ENV LC_ALL "en_US.utf8" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 143e673..52c97a4 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -24,7 +24,7 @@ platforms: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" entrypoint: init command: "bash -c 'sleep infinity'" - tty: True + tty: true env: container: docker lint: | diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml index bed2384..ce68a4a 100644 --- a/molecule/default/verify.yml +++ b/molecule/default/verify.yml @@ -58,7 +58,7 @@ - name: ceph osd pool create rbd shell: | set -o pipefail - ceph osd pool create rbd 8 8 + ceph osd pool create rbd ceph osd pool set rbd size 1 ceph osd pool set rbd min_size 1 ceph osd pool application enable rbd rbd @@ -80,7 +80,7 @@ - name: ceph osd pool create cephfs_metadata shell: | set -o pipefail - ceph osd pool create cephfs_metadata 32 32 + ceph osd pool create cephfs_metadata ceph osd pool set cephfs_metadata size 1 ceph osd pool set cephfs_metadata min_size 1 args: @@ -92,7 +92,7 @@ - name: ceph osd pool create cephfs_data shell: | set -o pipefail - ceph osd pool create cephfs_data 128 128 + ceph osd pool create cephfs_data ceph osd pool set cephfs_data size 1 ceph osd pool set cephfs_data min_size 1 args: diff --git a/molecule/ubuntu-20.04/molecule.yml b/molecule/ubuntu-20.04/molecule.yml index 2745bc3..3451d70 100644 --- a/molecule/ubuntu-20.04/molecule.yml +++ b/molecule/ubuntu-20.04/molecule.yml @@ -20,7 +20,7 @@ driver: name: libvirt platforms: - name: ${MOLECULE_INSTANCE_NAME}-1 - box: generic/ubuntu2004 + box: abi/ubuntu2004 cpu: 2 memory: 2048 interfaces: @@ -37,7 +37,7 @@ platforms: - ceph_mgr - ceph_osd - name: ${MOLECULE_INSTANCE_NAME}-2 - box: generic/ubuntu2004 + box: abi/ubuntu2004 cpu: 2 memory: 2048 interfaces: diff --git a/tasks/debian.yml b/tasks/debian.yml index 720146e..13f5862 100644 --- a/tasks/debian.yml +++ b/tasks/debian.yml @@ -23,5 +23,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw diff --git a/tasks/main.yml b/tasks/main.yml index 5d6aed4..4719003 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -82,7 +82,7 @@ state: "{{ item.state | default('present') }}" loop: "{{ ceph_rgw_config }}" notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: prepare files @@ -95,7 +95,7 @@ loop: - { dest: "/etc/ceph/ceph.conf", owner: "ceph", group: "ceph" } notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: create manager keyring @@ -114,7 +114,7 @@ register: result changed_when: result is not succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: copy templates @@ -128,7 +128,7 @@ - { dest: "/lib/systemd/system/ceph-radosgw@.service" } notify: - ceph_rgw | systemctl daemon-reload - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw - name: prepare files @@ -142,21 +142,27 @@ - { dest: "/lib/systemd/system/ceph-radosgw@.service" } - { dest: "/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}/keyring", owner: "ceph", group: "ceph", mode: "0600" } notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw -- name: flush handlers - meta: flush_handlers +- name: "systemctl start ceph-radosgw@rgw.{{ ansible_hostname }}" + service: + name: "ceph-radosgw@rgw.{{ ansible_hostname }}" + state: "started" + enabled: true + changed_when: false + ignore_errors: true tags: ceph_rgw -- name: start services +- name: systemctl start ceph-radosgw.target service: - name: "{{ item.name }}" + name: "ceph-radosgw.target" state: "started" enabled: true - loop: - - { name: "ceph-radosgw.target" } - - { name: "ceph-radosgw@rgw.{{ ansible_hostname }}" } changed_when: false ignore_errors: true tags: ceph_rgw + +- name: flush handlers + meta: flush_handlers + tags: ceph_rgw diff --git a/tasks/redhat.yml b/tasks/redhat.yml index 3b9ffd3..c115d77 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -22,5 +22,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw diff --git a/tasks/suse.yml b/tasks/suse.yml index f91f1f0..4e4729b 100644 --- a/tasks/suse.yml +++ b/tasks/suse.yml @@ -24,5 +24,5 @@ register: result until: result is succeeded notify: - - ceph_rgw | systemctl restart + - ceph_rgw | systemctl restart ceph-radosgw.target tags: ceph_rgw diff --git a/vars/ubuntu-19.10.yml b/vars/ubuntu-19.10.yml index 19456ef..9d6a8ea 100644 --- a/vars/ubuntu-19.10.yml +++ b/vars/ubuntu-19.10.yml @@ -15,6 +15,7 @@ # limitations under the License. _apt: - "15.2": [] + "15.2": + - { state: "latest", name: "radosgw" } "14.2": - { state: "latest", name: "radosgw" }