-
-
Save fxdgear/8d8f83dbceefe940093a to your computer and use it in GitHub Desktop.
openssh state file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set openssh = pillar.get('openssh', {}) -%} | |
{% set version = openssh.get('version', 'stable') -%} | |
{% set checksum = openssh.get('checksum', 'sha1=12755897666792eb9e1a0b7e4589eb1cb8e229d0') -%} | |
{% set root = openssh.get('root', '/usr/local') -%} | |
openssh-server: | |
pkg.removed: | |
- name: | |
- openssh-server | |
openssh-dependencies: | |
pkg.installed: | |
- names: | |
- zlib1g | |
- zlib1g-dev | |
- libssl-dev | |
- libpam0g-dev | |
- make | |
## Get openssh | |
get-openssh: | |
file.managed: | |
- name: {{ root }}/openssh-{{ version }}.tar.gz | |
- source: http://ftp5.usa.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-{{version}}.tar.gz | |
- source_hash: {{ checksum }} | |
- require: | |
- pkg: openssh-dependencies | |
cmd.wait: | |
- cwd: {{ root }} | |
- names: | |
- tar -zxvf {{ root }}/openssh-{{ version }}.tar.gz -C {{ root }} | |
- watch: | |
- file: get-openssh | |
install-openssh: | |
cmd.wait: | |
- cwd: {{ root }}/openssh-{{ version }} | |
- names: | |
- ./configure --prefix=/usr --libexecdir=/usr/lib/openssh --sysconfdir=/etc/ssh --with-pid-dir=/var/run --with-md5-passwords --with-pam | |
- make | |
- make install | |
- watch: | |
- cmd: get-openssh | |
restart-openssh: | |
cmd.wait: | |
- name: /etc/init.d/ssh restart | |
- watch: | |
- cmd: install-openssh |
install-openssh:
cmd.wait:
- cwd: {{ root }}/openssh-{{ version }}
- name: |
./configure --prefix=/usr --libexecdir=/usr/lib/openssh --sysconfdir=/etc/ssh --with-pid-dir=/var/run --with-md5-passwords --with-pam
make
make install
- watch:
- cmd: get-openssh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pillar Data: