Ejemplo n.º 1
0
    def to_yaml_file(self, filepath):
        """ Write this playbook to disk

        :param filepath: Filepath as a string
        """
        filepath = os.path.abspath(os.path.expanduser(filepath))
        with open(filepath, 'w') as f:
            pretty_yaml(self.playbook, f)
Ejemplo n.º 2
0
    def to_yaml_file(self, filepath):
        """ Write this playbook to disk

        :param filepath: Filepath as a string
        """
        filepath = os.path.abspath(os.path.expanduser(filepath))
        with open(filepath, 'w') as f:
            pretty_yaml(self.playbook, f)
Ejemplo n.º 3
0
 def to_yaml(self):
     """ Representation of the constructed module as YAML string
     :return: str
     """
     if not self.module:
         self._make_dict()
     return pretty_yaml(self.module)
Ejemplo n.º 4
0
 def to_yaml(self):
     """ Representation of the constructed module as YAML string
     :return: str
     """
     if not self.module:
         self._make_dict()
     return pretty_yaml(self.module)
Ejemplo n.º 5
0
 def to_yaml(self):
     return pretty_yaml(self.task)
Ejemplo n.º 6
0
    def to_yaml(self):
        """ Get the YAML representation of this playbook

        :return: str
        """
        return pretty_yaml(self.playbook)
Ejemplo n.º 7
0
    def to_yaml(self):
        """ Get the YAML representation of a play

        :return: str
        """
        return pretty_yaml(self.play)
Ejemplo n.º 8
0
 def to_yaml(self):
     return pretty_yaml(self.task)
Ejemplo n.º 9
0
    def to_yaml(self):
        """ Get the YAML representation of this playbook

        :return: str
        """
        return pretty_yaml(self.playbook)
Ejemplo n.º 10
0
    def to_yaml(self):
        """ Get the YAML representation of a play

        :return: str
        """
        return pretty_yaml(self.play)
Ejemplo n.º 11
0
 def __str__(self):
     """ String of ModuleBase
     :return: A pretty-formatted YAML representation of the module
     """
     return pretty_yaml(self.module)
Ejemplo n.º 12
0
 def __str__(self):
     """ String of ModuleBase
     :return: A pretty-formatted YAML representation of the module
     """
     return pretty_yaml(self.module)