Skip to content

Commit

Permalink
Merge pull request #8 from jabl/chroot
Browse files Browse the repository at this point in the history
Make role work with chroot images
  • Loading branch information
VilleS1 authored Nov 28, 2018
2 parents 185f330 + 00538ee commit 78cbbc3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

- name: restart opensm
service: name="{{ rdma_opensm_service }}" state=restarted
when: rdma_opensm_enabled == "yes"
when: rdma_opensm_enabled == "yes" and ansible_connection != 'chroot'
14 changes: 14 additions & 0 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@
enabled: "{{ rdma_service_enabled }}"
when:
- ansible_virtualization_type != "docker"
- ansible_connection != 'chroot'
- rdma_manage_rdma

- name: Enable the RDMA service on chroots
command: systemctl enable {{ rdma_service_name }}
when:
- ansible_connection == 'chroot'
- rdma_manage_rdma

- name: Generate the OpenSM partition configuration file
Expand All @@ -115,4 +122,11 @@
enabled: "{{ rdma_opensm_enabled }}"
when:
- ansible_virtualization_type != "docker"
- ansible_connection != 'chroot'
- rdma_manage_opensm

- name: Enable the OpenSM service on chroots
command: systemctl enable {{ rdma_opensm_service }}
when:
- ansible_connection == 'chroot'
- rdma_manage_opensm

0 comments on commit 78cbbc3

Please sign in to comment.