A module with simple implementations for MDT.
- mdt-core >= 0.0.1
- Ruby (tested with 2.5.0, earlier versions down to 2.0 may also work)
- RubyGems
gem install mdt-dummy
The module is automatically loaded by mdt
. All you need to do is to use appropriate keys in your mdt-deploy.yml
.
simple.env
- prepends an environment variable to the command. Options:name
- name of the variablevalue
- value of the variable
simple.sudo
- prepends sudo to the command. Options:args
- arguments with options for sudo (optional)
simple.generic
- prepends given string to the command. Options:modifier_str
- string to prepend to the command
simple.shell
- runs a command in a shell applying the command modifiers. Options:shell
- the shell executable (optional, default:/bin/bash
)args
- arguments with options for the shell (optional)command
- command to execute in the shell
simple.system
- runs a command applying the command modifiers. Options:command_string
- command to execute
simple.mkdir
- creates a directory. Options:path
- a path of a directory to be createdparents
- truthy if non-exising parents of the directory should be created too, falsey otherwise (empty also means falsey)
simple.cd
- changes the working directory. Options:path
- a path of the new working directory
simple.cp
- copies files and directories from source to destination. Options:source_path
- a path specifying the elements to be copieddestination_path
- a path specifying where the elements should be copiedrecursive
- truthy if directories should be copied recursively, falsey otherwise (empty also means falsey)
simple.mv
- moves files and directories from source to destination. Options:source_path
- a path specifying the elements to be moveddestination_path
- a path specifying where the elements should be moved
simple.rm
- removes files and directories. Options:path
- a path specifying the elements to be removedrecursive
- truthy if directories should be removed recursively, falsey otherwise (empty also means falsey)force
- truthy if the removal should be forced, falsey otherwise (empty also means falsey)
simple.ln
- creates links. Options:destination_path
- a path specifying what should be the destination of the linklink_name
- a path being the name of the linksymbolic
- truthy if the link should be symbolic, falsey otherwise (empty also means falsey)force
- truthy if creation of the link should be forced, falsey otherwise (empty also means falsey)
simple.chmod
- changes mode of files and directories. Options:mode
- a mode to setdestination_path
- a path specifying where the mode should be changedrecursive
- truthy if the mode should be changed recursively, falsey otherwise (empty also means falsey)
simple.chown
- changes owner of files and directories. Options:user
- the user which should be the ownergroup
- the group which should be the ownerdestination_path
- a path specifying where the owner should be changedrecursive
- truthy if the owner should be changed recursively, falsey otherwise (empty also means falsey)
simple.touch
- creates a file or updates its modification date. Options:path
- a path specifying the file that should be touched
simple.directory
- uses a simple directory path. Creates and changes to the directory. Does not remove the directory on failure. Options:path
- a path to the deploy directory
simple.directory
- uses a local directory. Options:path
- a path to the source directory
You can contribute to the development of this MDT module by submitting an issue or pull request.
Generated RDoc documentation can be found here.