skip to Main Content

Redis – Chef resource, script inside "not_if" is not working

I have a chef_resource that looks like this bash 'regenerate-master-list' do code <<-EOH rm -f /etc/datadog-agent/conf.d/redis_sentinel.d/conf.yaml EOH action :run notifies :create, 'cookbook_file[/etc/datadog-agent/conf.d/redis_sentinel.d/conf.yaml]', :immediately not_if "diff <(cat /etc/datadog-agent/conf.d/redis_sentinel.d/master_list) <(redis-cli -p 26379 info sentinel | grep name | sed 's/,.*//' | cut…

VIEW QUESTION

Redis – Sed with two variable

I encountered with behavior incomprehensible to me. NODES=6 PORT=6379 until [ $NODES -eq 0 ] do ((NEWPORT=PORT++)) cp cluster-config.conf redis-$NEWPORT.conf sed -i -e "s/$PORT/$NEWPORT/g" redis-$NEWPORT.conf ((NODES--)) done This doesn't work But this works NODES=6 PORT=6379 until [ $NODES -eq 0…

VIEW QUESTION
Back To Top
Search