Skip to content

Instantly share code, notes, and snippets.

@Arsh25
Last active May 15, 2020 01:01
Show Gist options
  • Save Arsh25/ac5c55f1d8bb6df3fe5ce965a1232627 to your computer and use it in GitHub Desktop.
Save Arsh25/ac5c55f1d8bb6df3fe5ce965a1232627 to your computer and use it in GitHub Desktop.
A basic chef recipe to test the new yaml recipe format introduced in Chef 16
resources:
- type: 'file'
name: 'test_file'
content: 'This file is managed by Chef. Do not edit'
mode: '0600'
owner: 'ubuntu'
group: 'ubuntu'
path: '/home/ubuntu/test_file'
- type: 'apt_update'
name: 'apt_update'
- type: 'apt_package'
name: 'kubuntu-desktop'
- type: 'directory'
name: '/home/ubuntu/.ssh'
mode: '0771'
owner: 'ubuntu'
group: 'ubuntu'
- type: 'file'
name: 'authorized_keys'
path: '/home/ubuntu/.ssh/authorized_keys'
content: 'This is a test key. File managed by Chef DO NOT EDIT'
mode: '0600'
owner: 'ubuntu'
group: 'ubuntu'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment