#coding:utf-8
import textwrap
class Modules(object):
    """
    Configure node system pwpolicy.
    """
    def __init__(self, command):
        self.cmd = command

    @property
    def __help__(self):
        info = """
        #==============================================================
        # %s
        #
        # module_path: %s
        # module_name: %s
        #==============================================================
        """ % (self.__doc__.strip(), self.__module__.strip(), self.__repr__())
        return info
        
    def run(self, args):

        anaconda = []
        anaconda.append(self.__help__)
        anaconda.append("pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty")
        anaconda.append("pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok")
        anaconda.append("pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty")
        self.cmd.ks.addAnaconda(anaconda)

    def __repr__(self):
        return "kickstart-anaconda"
