Skip to content

Commit

Permalink
Added missing change controls
Browse files Browse the repository at this point in the history
  • Loading branch information
jtopjian committed Jul 24, 2015
1 parent 243a35e commit 833c72a
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/apache/resources/apache_section.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ function apache.section.create {
stdlib.error "Error adding apache.section $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function apache.section.delete {
Expand All @@ -137,4 +141,8 @@ function apache.section.delete {
stdlib.error "Error deleting apache.section $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/apache/resources/apache_setting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ function apache.setting.update {
stdlib.error "Error adding apache.setting $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function apache.setting.delete {
Expand All @@ -172,4 +176,8 @@ function apache.setting.delete {
stdlib.error "Error deleting apache.setting $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/consul/resources/consul_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ function consul.check.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function consul.check.delete {
Expand All @@ -174,4 +178,8 @@ function consul.check.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/consul/resources/consul_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ function consul.service.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function consul.service.delete {
Expand All @@ -240,4 +244,8 @@ function consul.service.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/keepalived/resources/keepalived_global_defs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ function keepalived.global_defs.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function keepalived.global_defs.delete {
Expand All @@ -179,4 +183,8 @@ function keepalived.global_defs.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/keepalived/resources/keepalived_vrrp_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ function keepalived.vrrp_instance.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function keepalived.vrrp_instance.delete {
Expand Down Expand Up @@ -309,4 +313,8 @@ function keepalived.vrrp_instance.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/keepalived/resources/keepalived_vrrp_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ function keepalived.vrrp_script.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function keepalived.vrrp_script.delete {
Expand All @@ -157,4 +161,8 @@ function keepalived.vrrp_script.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/keepalived/resources/keepalived_vrrp_sync_group.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ function keepalived.vrrp_sync_group.create {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function keepalived.vrrp_sync_group.delete {
Expand All @@ -148,4 +152,8 @@ function keepalived.vrrp_sync_group.delete {
if [[ "$_result" =~ ^error ]]; then
stdlib.error "Error adding $_name with augeas: $_result"
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/nginx/resources/nginx_events.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ function nginx.events.create {
stdlib.error "Error adding nginx.http $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.events.delete {
Expand All @@ -120,4 +124,8 @@ function nginx.events.delete {
stdlib.error "Error deleting nginx.events $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
8 changes: 8 additions & 0 deletions lib/nginx/resources/nginx_global.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ function nginx.global.create {
stdlib.error "Error adding nginx.http $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.global.delete {
Expand All @@ -121,4 +125,8 @@ function nginx.global.delete {
stdlib.error "Error deleting nginx.global $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
12 changes: 12 additions & 0 deletions lib/nginx/resources/nginx_if.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ function nginx.if.create {
stdlib.error "Error adding nginx_if $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.if.update {
Expand All @@ -141,6 +145,10 @@ function nginx.if.update {
stdlib.error "Error adding nginx_if $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.if.delete {
Expand All @@ -153,4 +161,8 @@ function nginx.if.delete {
stdlib.error "Error deleting nginx_if $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
12 changes: 12 additions & 0 deletions lib/nginx/resources/nginx_location.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ function nginx.location.create {
stdlib.error "Error adding nginx_location $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.location.update {
Expand All @@ -164,6 +168,10 @@ function nginx.location.update {
stdlib.error "Error adding nginx_location $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.location.delete {
Expand All @@ -176,4 +184,8 @@ function nginx.location.delete {
stdlib.error "Error deleting nginx_location $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
12 changes: 12 additions & 0 deletions lib/nginx/resources/nginx_map.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ function nginx.map.create {
stdlib.error "Error adding nginx.map $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.map.update {
Expand All @@ -136,6 +140,10 @@ function nginx.map.update {
stdlib.error "Error adding nginx.map $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.map.delete {
Expand All @@ -148,4 +156,8 @@ function nginx.map.delete {
stdlib.error "Error deleting nginx.map $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
12 changes: 12 additions & 0 deletions lib/nginx/resources/nginx_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ function nginx.server.create {
stdlib.error "Error adding nginx_server $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.server.update {
Expand All @@ -131,6 +135,10 @@ function nginx.server.update {
stdlib.error "Error adding nginx_server $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.server.delete {
Expand All @@ -143,4 +151,8 @@ function nginx.server.delete {
stdlib.error "Error deleting nginx_server $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}
12 changes: 12 additions & 0 deletions lib/nginx/resources/nginx_upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ function nginx.upstream.create {
stdlib.error "Error adding nginx.upstream $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.upstream.update {
Expand All @@ -137,6 +141,10 @@ function nginx.upstream.update {
stdlib.error "Error adding nginx.upstream $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

function nginx.upstream.delete {
Expand All @@ -149,4 +157,8 @@ function nginx.upstream.delete {
stdlib.error "Error deleting nginx.upstream $_name with augeas: $_result"
return
fi

stdlib_state_change="true"
stdlib_resource_change="true"
let "stdlib_resource_changes++"
}

0 comments on commit 833c72a

Please sign in to comment.