#cloud-config

name: "SELinux"
stages:
  initramfs:
    - name: "Relabelling"
      if: |
          cat /proc/cmdline | grep "selinux=1"
      # NOTE: restorecon below is labeling all the files recursively, which may
      # delay booting significantly (we had users reporting 30-minute delays)
      # When we support selinux, consider whether we need to run it on every boot
      # or not.
      commands:
        - |
          load_policy -i
          restorecon -R -i -v /etc /root /opt /srv /var /home /usr/local /oem
