code: def set_selinux(self, state):
          
          allowed_states = ('enforcing', 'permissive', 'disabled')
          if state not in allowed_states:
              raise Exception
          self.run('setenforce %s' % state)
          self.create_file('/etc/sysconfig/selinux',
                           'SELINUX=%s\nSELINUXTYPE=targeted\n' % state)
docs: Help to enable/disable SELinux on the host.