Skip to content

Commit

Permalink
Data for golang #68
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed Aug 9, 2023
1 parent ce0f483 commit 5d19484
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
87 changes: 87 additions & 0 deletions data/golang/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
golang::settings:
tp_prerequisites: {}

urls:
website: 'https://go.dev'
issues: 'https://github.com/golang/go/issues'
documentation: 'https://go.dev/doc/'
source: 'https://github.com/golang/go'
description: 'The Go programming language'

# Configured: +package -source -file +image
install_method: 'package'

packages:
main:
name: golang
ensure: present
source: ~
install_options: []
params: {}
providers:
chocolatey:
name: golang
scoop:
name: go
winget:
name: ~
snap:
name: go
brew:
name: go

info_commands:
list: 'go list'
debug_commands:
debug: 'go debug'
test_commands:
status: 'go status'
version_command: 'go version'
help_command: 'go help'
run_commands:
start:
command: 'golang start'

image:
name: 'golang'

build:
prerequisites:
tp::install:
- build-essential
execs:
- name: configure
command: './configure'
- name: build
command: 'make'
- name: setup
command: 'make install'
setup:
enable: true
files:
golang:
path: '/usr/local/bin/golang'
mode: '0755'
systemd_options: {}
resources: {}
manage_service: false
manage_user: false

release:
latest_version: ~
prerequisites: {}
latest_url: ~
base_url: 'https://go.dev/dl/go$VERSION.$OS-$ARCH.tar.gz'
file_name: 'go$VERSION.$OS-$ARCH..tar.gz'
extracted_dir: 'go$VERSION.$OS-$ARCH.tar.gz'
file_format: tar.gz
setup:
enable: true
files:
golang:
path: '/usr/local/bin/golang'
mode: '0755'
resources: {}
manage_service: false
manage_user: false
15 changes: 15 additions & 0 deletions data/golang/hiera.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions data/golang/osfamily/Darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
golang::settings:

release:
https://go.dev/dl/go1.20.darwin-arm64.pkg
6 changes: 6 additions & 0 deletions data/golang/osfamily/Debian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
golang::settings:

files:
init:
path: '/etc/default/golang'
3 changes: 3 additions & 0 deletions data/golang/osfamily/RedHat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
golang::settings:
dockerfile_prerequisites: 'RUN yum install -y wget which'
14 changes: 14 additions & 0 deletions data/golang/osfamily/windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
golang::settings:

# If exe or msi package is available for direct download:
package_provider: 'windows'
package_source: 'https://go.dev/dl/go$VERSION.$OS-$ARCH.msi'

user_files:
config:
path: '%APPDATA%\golang\golang.conf'

user_dirs:
config:
path: '%APPDATA%\golang'

0 comments on commit 5d19484

Please sign in to comment.