propellor-5.13: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell2010

Propellor.Property.Rsync

Synopsis

- type Src = FilePath
- type Dest = FilePath
- class RsyncParam p where
  - toRsync :: p -> String
- filesUnder :: FilePath -> Pattern
- syncDir :: Src -> Dest -> Property (DebianLike + ArchLinux)
- data Filter
  - = Include Pattern
  - | Exclude Pattern
  - | Protect Pattern
- newtype Pattern = Pattern String
- syncDirFiltered :: [Filter] -> Src -> Dest -> Property (DebianLike + ArchLinux)
- rsync :: [String] -> Property (DebianLike + ArchLinux)
- installed :: Property (DebianLike + ArchLinux)

# Documentation

type Src = FilePath Source #

type Dest = FilePath Source #

class RsyncParam p where Source #

Methods

toRsync :: p -> String Source #

#### Instances

Instances details

RsyncParam Filter Source # |
Instance details Defined in Propellor.Property.Rsync Methods toRsync :: Filter -> String Source #

filesUnder :: FilePath -> Pattern Source #

A pattern that matches all files under a directory, but does not match the directory itself.

syncDir :: Src -> Dest -> Property (DebianLike + ArchLinux) Source #

Ensures that the Dest directory exists and has identical contents as the Src directory.

data Filter Source #

Constructors

Include Pattern |
Exclude Pattern |
Protect Pattern |

#### Instances

Instances details

RsyncParam Filter Source # |
Instance details Defined in Propellor.Property.Rsync Methods toRsync :: Filter -> String Source #

newtype Pattern Source #

A pattern to match against files that rsync is going to transfer.

See "INCLUDE/EXCLUDE PATTERN RULES" in the rsync(1) man page.

For example, Pattern "foo*" matches all files under the "foo" directory, relative to the `Src` that rsync is acting on.

Constructors

Pattern String |

syncDirFiltered :: [Filter] -> Src -> Dest -> Property (DebianLike + ArchLinux) Source #

Like syncDir, but avoids copying anything that the filter list excludes. Anything that's filtered out will be deleted from Dest.

Rsync checks each name to be transferred against its list of Filter rules, and the first matching one is acted on. If no matching rule is found, the file is processed.

rsync :: [String] -> Property (DebianLike + ArchLinux) Source #

installed :: Property (DebianLike + ArchLinux) Source #