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

Safe Haskell | Safe-Inferred
Language | Haskell2010

Propellor.Types.OS

Synopsis

- data System = System Distribution Architecture
- data Distribution
  - = Debian DebianKernel DebianSuite
  - | Buntish Release
  - | ArchLinux
  - | FreeBSD FreeBSDRelease
- data TargetOS
  - = OSDebian
  - | OSBuntish
  - | OSArchLinux
  - | OSFreeBSD
- data DebianKernel
  - = Linux
  - | KFreeBSD
  - | Hurd
- data DebianSuite
  - = Experimental
  - | Unstable
  - | Testing
  - | Stable Release
- data FreeBSDRelease
  - = FBSDProduction FBSDVersion
  - | FBSDLegacy FBSDVersion
- data FBSDVersion
  - = FBSD101
  - | FBSD102
  - | FBSD093
- isStable :: DebianSuite -> Bool
- type Release = String
- data Architecture
  - = X86_64
  - | X86_32
  - | ARMHF
  - | ARMEL
  - | PPC
  - | PPC64
  - | SPARC
  - | SPARC64
  - | MIPS
  - | MIPSEL
  - | MIPS64EL
  - | SH4
  - | IA64
  - | S390
  - | S390X
  - | ALPHA
  - | HPPA
  - | M68K
  - | ARM64
  - | X32
- architectureToDebianArchString :: Architecture -> String
- type HostName = String
- type UserName = String
- newtype User = User UserName
- newtype Group = Group String
- userGroup :: User -> Group
- newtype Port = Port Int
- systemToTargetOS :: System -> TargetOS

# Documentation

data System Source #

High level description of a operating system.

Constructors

System Distribution Architecture |

#### Instances

Instances details

Show System Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> System -> ShowS show :: System -> String showList :: [System] -> ShowS
Eq System Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: System -> System -> Bool (/=) :: System -> System -> Bool

data Distribution Source #

Constructors

Debian DebianKernel DebianSuite |
Buntish Release | A well-known Debian derivative founded by a space tourist. The actual name of this distribution is not used in Propellor per http://joeyh.name/blog/entry/trademark_nonsense/
ArchLinux |
FreeBSD FreeBSDRelease |

#### Instances

Instances details

Show Distribution Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> Distribution -> ShowS show :: Distribution -> String showList :: [Distribution] -> ShowS
Eq Distribution Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: Distribution -> Distribution -> Bool (/=) :: Distribution -> Distribution -> Bool

data TargetOS Source #

Properties can target one or more OS's; the targets are part of the type of the property, so need to be kept fairly simple.

Constructors

OSDebian |
OSBuntish |
OSArchLinux |
OSFreeBSD |

#### Instances

Instances details

Show TargetOS Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> TargetOS -> ShowS show :: TargetOS -> String showList :: [TargetOS] -> ShowS
Eq TargetOS Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: TargetOS -> TargetOS -> Bool (/=) :: TargetOS -> TargetOS -> Bool
Ord TargetOS Source # |
Instance details Defined in Propellor.Types.OS Methods compare :: TargetOS -> TargetOS -> Ordering (<) :: TargetOS -> TargetOS -> Bool (<=) :: TargetOS -> TargetOS -> Bool (>) :: TargetOS -> TargetOS -> Bool (>=) :: TargetOS -> TargetOS -> Bool max :: TargetOS -> TargetOS -> TargetOS min :: TargetOS -> TargetOS -> TargetOS

data DebianKernel Source #

Most of Debian ports are based on Linux. There also exist hurd-i386, kfreebsd-i386, kfreebsd-amd64 ports

Constructors

Linux |
KFreeBSD |
Hurd |

#### Instances

Instances details

Show DebianKernel Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> DebianKernel -> ShowS show :: DebianKernel -> String showList :: [DebianKernel] -> ShowS
Eq DebianKernel Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: DebianKernel -> DebianKernel -> Bool (/=) :: DebianKernel -> DebianKernel -> Bool

data DebianSuite Source #

Debian has several rolling suites, and a number of stable releases, such as Stable "bookworm".

Constructors

Experimental |
Unstable |
Testing |
Stable Release |

#### Instances

Instances details

Show DebianSuite Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> DebianSuite -> ShowS show :: DebianSuite -> String showList :: [DebianSuite] -> ShowS
Eq DebianSuite Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: DebianSuite -> DebianSuite -> Bool (/=) :: DebianSuite -> DebianSuite -> Bool

data FreeBSDRelease Source #

FreeBSD breaks their releases into Production and Legacy.

Constructors

FBSDProduction FBSDVersion |
FBSDLegacy FBSDVersion |

#### Instances

Instances details

Show FreeBSDRelease Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> FreeBSDRelease -> ShowS show :: FreeBSDRelease -> String showList :: [FreeBSDRelease] -> ShowS
Eq FreeBSDRelease Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: FreeBSDRelease -> FreeBSDRelease -> Bool (/=) :: FreeBSDRelease -> FreeBSDRelease -> Bool

data FBSDVersion Source #

Constructors

FBSD101 |
FBSD102 |
FBSD093 |

#### Instances

Instances details

IsString FBSDVersion Source # |
Instance details Defined in Propellor.Types.OS Methods fromString :: String -> FBSDVersion #
Show FBSDVersion Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> FBSDVersion -> ShowS show :: FBSDVersion -> String showList :: [FBSDVersion] -> ShowS
Eq FBSDVersion Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: FBSDVersion -> FBSDVersion -> Bool (/=) :: FBSDVersion -> FBSDVersion -> Bool
ConfigurableValue FBSDVersion Source # |
Instance details Defined in Propellor.Types.OS Methods val :: FBSDVersion -> String Source #

isStable :: DebianSuite -> Bool Source #

type Release = String Source #

data Architecture Source #

Many of these architecture names are based on the names used by Debian, with a few exceptions for clarity.

Constructors

X86_64 | 64 bit Intel, called "amd64" in Debian
X86_32 | 32 bit Intel, called "i386" in Debian
ARMHF |
ARMEL |
PPC |
PPC64 |
SPARC |
SPARC64 |
MIPS |
MIPSEL |
MIPS64EL |
SH4 |
IA64 | Itanium
S390 |
S390X |
ALPHA |
HPPA |
M68K |
ARM64 |
X32 | New Linux ABI for 64 bit CPUs using 32-bit integers. Not widely used.

#### Instances

Instances details

Show Architecture Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> Architecture -> ShowS show :: Architecture -> String showList :: [Architecture] -> ShowS
Eq Architecture Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: Architecture -> Architecture -> Bool (/=) :: Architecture -> Architecture -> Bool

architectureToDebianArchString :: Architecture -> String Source #

type HostName = String #

type UserName = String Source #

newtype User Source #

Constructors

User UserName |

#### Instances

Instances details

Show User Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> User -> ShowS show :: User -> String showList :: [User] -> ShowS
Eq User Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: User -> User -> Bool (/=) :: User -> User -> Bool
Ord User Source # |
Instance details Defined in Propellor.Types.OS Methods compare :: User -> User -> Ordering (<) :: User -> User -> Bool (<=) :: User -> User -> Bool (>) :: User -> User -> Bool (>=) :: User -> User -> Bool max :: User -> User -> User min :: User -> User -> User
ConfigurableValue User Source # |
Instance details Defined in Propellor.Types.OS Methods val :: User -> String Source #

newtype Group Source #

Constructors

Group String |

#### Instances

Instances details

Show Group Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> Group -> ShowS show :: Group -> String showList :: [Group] -> ShowS
Eq Group Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: Group -> Group -> Bool (/=) :: Group -> Group -> Bool
Ord Group Source # |
Instance details Defined in Propellor.Types.OS Methods compare :: Group -> Group -> Ordering (<) :: Group -> Group -> Bool (<=) :: Group -> Group -> Bool (>) :: Group -> Group -> Bool (>=) :: Group -> Group -> Bool max :: Group -> Group -> Group min :: Group -> Group -> Group
ConfigurableValue Group Source # |
Instance details Defined in Propellor.Types.OS Methods val :: Group -> String Source #

userGroup :: User -> Group Source #

Makes a Group with the same name as the User.

newtype Port Source #

Constructors

Port Int |

#### Instances

Instances details

Show Port Source # |
Instance details Defined in Propellor.Types.OS Methods showsPrec :: Int -> Port -> ShowS show :: Port -> String showList :: [Port] -> ShowS
Eq Port Source # |
Instance details Defined in Propellor.Types.OS Methods (==) :: Port -> Port -> Bool (/=) :: Port -> Port -> Bool
Ord Port Source # |
Instance details Defined in Propellor.Types.OS Methods compare :: Port -> Port -> Ordering (<) :: Port -> Port -> Bool (<=) :: Port -> Port -> Bool (>) :: Port -> Port -> Bool (>=) :: Port -> Port -> Bool max :: Port -> Port -> Port min :: Port -> Port -> Port
Publishable Port Source # |
Instance details Defined in Propellor.Property.Systemd Methods toPublish :: Port -> String
ConfigurableValue Port Source # |
Instance details Defined in Propellor.Types.OS Methods val :: Port -> String Source #
Publishable (Bound Port) Source # |
Instance details Defined in Propellor.Property.Docker Methods toPublish :: Bound Port -> String
Publishable (Bound Port) Source # |
Instance details Defined in Propellor.Property.Systemd Methods toPublish :: Bound Port -> String
Publishable (Proto, Bound Port) Source # |
Instance details Defined in Propellor.Property.Systemd Methods toPublish :: (Proto, Bound Port) -> String

systemToTargetOS :: System -> TargetOS Source #