From ad1ecf76744eb8661ba268c7826ce90c92cb0f3a Mon Sep 17 00:00:00 2001 From: Alessandro Franceschi Date: Wed, 15 Feb 2023 18:52:13 +0100 Subject: [PATCH] Data for mgmt #67 --- data/mgmt/default.yaml | 118 ++++++++++++++++++++++++++++++++ data/mgmt/hiera.yaml | 15 ++++ data/mgmt/osfamily/Darwin.yaml | 11 +++ data/mgmt/osfamily/Debian.yaml | 6 ++ data/mgmt/osfamily/RedHat.yaml | 3 + data/mgmt/osfamily/windows.yaml | 14 ++++ 6 files changed, 167 insertions(+) create mode 100644 data/mgmt/default.yaml create mode 100644 data/mgmt/hiera.yaml create mode 100644 data/mgmt/osfamily/Darwin.yaml create mode 100644 data/mgmt/osfamily/Debian.yaml create mode 100644 data/mgmt/osfamily/RedHat.yaml create mode 100644 data/mgmt/osfamily/windows.yaml diff --git a/data/mgmt/default.yaml b/data/mgmt/default.yaml new file mode 100644 index 00000000..050f736c --- /dev/null +++ b/data/mgmt/default.yaml @@ -0,0 +1,118 @@ +--- +mgmt::settings: + tp_prerequisites: {} + + urls: + website: 'https://github.com/purpleidea/mgmt' + issues: 'https://github.com/purpleidea/mgmt/issues' + documentation: 'https://github.com/purpleidea/mgmt/blob/master/docs/documentation.md' + source: 'https://github.com/purpleidea/mgmt' + description: 'Mgmt is a real-time automation tool.' + + # Configured: -package -source +release -image + install_method: 'release' + + packages: + main: + name: mgmt + + services: + mgmt: + process_name: mgmt + process_extra_name: ~ + process_user: root + process_group: root + nodaemon_args: '-D' + ensure: running + enable: true + pidfile: /run/mgmt.pid + params: {} + + + files: + config: + path: '/etc/mgmt/mgmt.conf' + init: + path: '/etc/sysconfig/mgmt.conf' + format: 'inifile' + systemd: + path: '/etc/systemd/system/mgmt.service' + format: 'inifile_with_stanzas' + + dirs: + config: + path: '/etc/mgmt' + conf: + path: '/etc/mgmt/conf.d' + log: + path: /var/log/mgmt + home: + path: /var/lib/mgmt + + user_files: + config: + path: '$HOME/.mgmt/mgmt.conf' + + user_dirs: + config: + path: '$HOME/.mgmt' + + ports: + main: + port: 42 + protocol: tcp + ssl: + port: 4432 + protocol: tcp + + info_commands: + list: 'mgmt list' + debug_commands: + debug: 'mgmt debug' + test_commands: + status: 'mgmt status' + version_command: 'mgmt version' + help_command: 'mgmt help' + run_commands: + start: + command: 'mgmt start' + + build: + prerequisites: + tp::install: + - golang + execs: + - name: build + command: 'make' + setup: + enable: true + files: + mgmt: + path: '/usr/local/bin/mgmt' + mode: '0755' + systemd_options: {} + resources: {} + manage_service: false + manage_user: false + + release: + latest_version: '0.0.21-1' + prerequisites: {} + latest_url: ~ + base_url: 'https://github.com/purpleidea/mgmt/releases' + file_name: 'mgmt-$VERSION.$OS-$ARCH.tar.gz' + extracted_dir: 'mgmt-$VERSION.$OS-$ARCH' + file_format: tar.gz + setup: + enable: true + files: + mgmt: + path: '/usr/local/bin/mgmt' + mode: '0755' + systemd_options: + Service: + ExecStart: '/usr/local/bin/mgmt run empty' + EnvironmentFile: ~ + resources: {} + manage_service: false + manage_user: false diff --git a/data/mgmt/hiera.yaml b/data/mgmt/hiera.yaml new file mode 100644 index 00000000..b2a2fa6a --- /dev/null +++ b/data/mgmt/hiera.yaml @@ -0,0 +1,15 @@ +--- +:hierarchy: + - "%{title}/%{repo}/operatingsystem/%{operatingsystem}%{operatingsystemmajrelease}" + - "%{title}/%{repo}/operatingsystem/%{operatingsystem}" + - "%{title}/%{repo}/osfamily/%{osfamily}%{operatingsystemmajrelease}" + - "%{title}/%{repo}/osfamily/%{osfamily}" + - "%{title}/%{repo}/default" + - "%{title}/operatingsystem/%{operatingsystem}%{operatingsystemmajrelease}" + - "%{title}/operatingsystem/%{operatingsystem}" + - "%{title}/osfamily/%{osfamily}%{operatingsystemmajrelease}" + - "%{title}/osfamily/%{osfamily}" + - "%{title}/default" + - "default/%{operatingsystem}%{operatingsystemmajrelease}" + - "default/%{operatingsystem}" + - default diff --git a/data/mgmt/osfamily/Darwin.yaml b/data/mgmt/osfamily/Darwin.yaml new file mode 100644 index 00000000..041afadc --- /dev/null +++ b/data/mgmt/osfamily/Darwin.yaml @@ -0,0 +1,11 @@ +--- +mgmt::settings: + brew_package_name: 'mgmt' + + user_files: + config: + path: '$HOME/Library/Application\ Support/mgmt/mgmt.conf' + + user_dirs: + config: + path: '$HOME/Library/Application\ Support/mgmt/mgmt.conf' \ No newline at end of file diff --git a/data/mgmt/osfamily/Debian.yaml b/data/mgmt/osfamily/Debian.yaml new file mode 100644 index 00000000..6542483e --- /dev/null +++ b/data/mgmt/osfamily/Debian.yaml @@ -0,0 +1,6 @@ +--- +mgmt::settings: + + files: + init: + path: '/etc/default/mgmt' \ No newline at end of file diff --git a/data/mgmt/osfamily/RedHat.yaml b/data/mgmt/osfamily/RedHat.yaml new file mode 100644 index 00000000..38eac048 --- /dev/null +++ b/data/mgmt/osfamily/RedHat.yaml @@ -0,0 +1,3 @@ +--- +mgmt::settings: + dockerfile_prerequisites: 'RUN yum install -y wget which' diff --git a/data/mgmt/osfamily/windows.yaml b/data/mgmt/osfamily/windows.yaml new file mode 100644 index 00000000..63713036 --- /dev/null +++ b/data/mgmt/osfamily/windows.yaml @@ -0,0 +1,14 @@ +--- +mgmt::settings: + + # If exe or msi package is available for direct download: + package_provider: 'windows' + package_source: 'https://github.com/mgmt/mgmt/releases/download/v$VERSION/mgmt_$VERSION_$OS_$ARCH.msi' + + user_files: + config: + path: '%APPDATA%\mgmt\mgmt.conf' + + user_dirs: + config: + path: '%APPDATA%\mgmt' \ No newline at end of file