No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cookbooks/foo
Gemfile
Gemfile.lock
README.org
node.json
solo.rb

README.org

This is a test repo allows you to test remote_directory resource.

Setup

cd /tmp
git clone https://mhorbul@github.com/mhorbul/remote-directory-notification.git
cd remote-directory-notification
bundle install

Run

  • Make sure you do not have target folder and flag file.
ls -al /tmp | grep foo
  • Run chef-solo
chef-solo -c solo.rb
  • Make sure target folder is created and flag file is in /tmp.
ls -al /tmp | grep foo
  • Run chef-solo again
chef-solo -c solo.rb
  • Flag file /tmp/foo.updated has been removed by recipe and never created back by execute resource via notification because /tmp/foo has not been changed.
ls -al /tmp/foo.updated
  • Modify or remove file(s) in the /tmp/foo folder. And run chef-solo again.
echo 2 > /tmp/foo/1/1.txt
chf-solo -c solo.rb
  • Make sure target folder is upadted to the initial state and flag file is in /tmp.
cat /tmp/foo/1/1.txt
ls -al /tmp/foo.updated