nomad-server-config-file

Description

Nomad server configuration.

Variables

Name Type Default Description

path

string --

The path to the file. Required

bootstrap_expect

integer --

This flag provides the number of expected servers in the datacenter. Either this value should not be provided or the value must agree with other servers in the cluster. When provided, Consul waits until the specified number of servers are available and then bootstraps the cluster. This allows an initial leader to be elected automatically. This cannot be used in conjunction with the legacy -bootstrap flag. This flag requires -server mode.

group

string --

The group of the file.

mode

string --

The permissions of the file.

owner

string --

The owner of the file.

Code

doc:
  short_help: Nomad server configuration.

args:
  bootstrap_expect:
    doc:
      short_help: This flag provides the number of expected servers in the datacenter.
      help: |
        This flag provides the number of expected servers in the datacenter. Either this value should not be provided or the value must agree with other servers in the cluster. When provided, Consul waits until the specified number of servers are available and then bootstraps the cluster. This allows an initial leader to be elected automatically. This cannot be used in conjunction with the legacy -bootstrap flag. This flag requires -server mode.
    type: integer
    required: false
  _import:
  - file-with-content
frecklets:
- file-with-content:
    path: '{{:: path ::}}'
    group: '{{:: group ::}}'
    owner: '{{:: owner ::}}'
    mode: '{{:: mode ::}}'
    content: |-
      server {
        enabled = true
        {%:: if bootstrap_expect is defined ::%}bootstrap_expect = {{:: bootstrap_expect ::}}{%:: endif ::%}
      }
frecklecute nomad-server-config-file --help

Usage: frecklecute nomad-server-config-file [OPTIONS] PATH

  Nomad server configuration.

Options:
  --bootstrap-expect BOOTSTRAP_EXPECT
                                  This flag provides the number of expected
                                  servers in the datacenter.
  --group GROUP                   The group of the file.
  --mode MODE                     The permissions of the file.
  --owner USER                    The owner of the file.
  --help                          Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.nomad_server_config_file.NomadServerConfigFile
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class NomadServerConfigFile(AutoPycklet):
    """Nomad server configuration.

       Args:
         bootstrap_expect: This flag provides the number of expected servers in the datacenter.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.

    """

    FRECKLET_ID = "nomad-server-config-file"

    bootstrap_expect: int = None
    group: str = None
    mode: str = None
    owner: str = None
    path: str = None


    def __post_init__(self):
        super(NomadServerConfigFile, self).__init__(var_names=["bootstrap_expect", "group", "mode", "owner", "path"])


frecklet_class = NomadServerConfigFile
# -*- coding: utf-8 -*-


#
# module path: pycklets.nomad_server_config_file.NomadServerConfigFile
#


from pyckles import AutoPycklet

class NomadServerConfigFile(AutoPycklet):
    """Nomad server configuration.

       Args:
         bootstrap_expect: This flag provides the number of expected servers in the datacenter.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.

    """

    FRECKLET_ID = "nomad-server-config-file"

    def __init__(self, bootstrap_expect=None, group=None, mode=None, owner=None, path=None):

        super(NomadServerConfigFile, self).__init__(var_names=["bootstrap_expect", "group", "mode", "owner", "path"])
        self._bootstrap_expect = bootstrap_expect
        self._group = group
        self._mode = mode
        self._owner = owner
        self._path = path

    @property
    def bootstrap_expect(self):
        return self._bootstrap_expect

    @bootstrap_expect.setter
    def bootstrap_expect(self, bootstrap_expect):
        self._bootstrap_expect = bootstrap_expect

    @property
    def group(self):
        return self._group

    @group.setter
    def group(self, group):
        self._group = group

    @property
    def mode(self):
        return self._mode

    @mode.setter
    def mode(self, mode):
        self._mode = mode

    @property
    def owner(self):
        return self._owner

    @owner.setter
    def owner(self, owner):
        self._owner = owner

    @property
    def path(self):
        return self._path

    @path.setter
    def path(self, path):
        self._path = path



frecklet_class = NomadServerConfigFile