Last active
August 29, 2015 14:04
-
-
Save jmara/ff9fdcfa45c053fff688 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
file "/opt/local-user.txt" do | |
action :create | |
owner "root" | |
group "root" | |
content "jmara" | |
mode 00644 | |
end | |
if File.exist?("/opt/local-user.txt") | |
user = File.read("/opt/local-user.txt") | |
node.set["local_user"] = user | |
log "Current user: #{node['local_user']} -> #{user}" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment