Skip to content

Commit

Permalink
Merge pull request fgci-org#11 from jabl/chroot
Browse files Browse the repository at this point in the history
Make role work for chroot images
  • Loading branch information
mhakala authored Dec 6, 2018
2 parents 919b7a5 + f61da7d commit c6b5a89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@
register: lustre_networks
failed_when: False
changed_when: lustre_networks.rc != 0
when: ansible_connection != 'chroot'

- name: Bring up Lustre networks if down
command: /usr/sbin/ifup {{ item[1] }}
when: item[0].rc != 0
with_nested:
- "{{ lustre_networks.results }}"
- "{{ lustre_network_devices|default([]) }}"
when: ansible_connection != 'chroot'

- name: Load Lustre modules
modprobe: name=lustre
when: ansible_connection != 'chroot'

- name: create lustre mount directory
file: "path={{ lustre_mount_dir }} state=directory mode={{ lustre_dir_mode }} owner=root group=root"

- name: Add Lustre entry to /etc/fstab, make sure it is mounted
mount: fstype=lustre name="{{ lustre_mount_dir }}" opts="{{ lustre_mount_opts }}" src="{{ lustre_mount_src }}" state=mounted
mount: fstype=lustre name="{{ lustre_mount_dir }}" opts="{{ lustre_mount_opts }}" src="{{ lustre_mount_src }}" state="{{ 'mounted' if ansible_connection != 'chroot' else 'present' }}"

0 comments on commit c6b5a89

Please sign in to comment.