diff --git a/home/bin/deboco b/home/bin/deboco index dd4988c..710f03e 100755 --- a/home/bin/deboco +++ b/home/bin/deboco @@ -476,7 +476,7 @@ common_update_machine() local debops_controller_path="$1" local target_host_fqdn="$2" # eg alambix-108.ipr.univ-rennes.fr local only_role="$3" # eg "role::xymon_server" or "role::rsyslog" or "" if all roles need to be applied - local machine_group="$4" # eg 'site' or 'service/apache2' + local playbook="$4" # eg 'site' or 'service/apache2' debops_controller_path=$(realpath $debops_controller_path) log 'info' "updating $target_host_fqdn using debobs controller $debops_controller_path" @@ -536,24 +536,21 @@ deboco__update_machine() local debops_controller_path="$1" local target_host_fqdn="$2" # eg alambix-108.ipr.univ-rennes.fr local only_role="" - local machine_group="site" - common_update_machine "$debops_controller_path" "$target_host_fqdn" "$only_role" "$machine_group" + local playbook="site" + common_update_machine "$debops_controller_path" "$target_host_fqdn" "$only_role" "$playbook" } deboco__update_machine_partially() { local debops_controller_path="$1" local target_host_fqdn="$2" # eg alambix-108.ipr.univ-rennes.fr - local only_role="$3" # eg "role::xymon_server" or "role::rsyslog" or "" if all roles need to be applied - local service="$4" # eg "nginx" "apache2" - local machine_group='' - if [ "$service" = "" ] + local only_role="$3" # eg "role::xymon", "role::xymon_server" or "role::rsyslog" or "" if all roles need to be applied + local playbook="$4" # eg "site", "ipr", "service/nginx" "service/apache2" + if [ "$playbook" = "" ] then - machine_group='site' - else - machine_group="service/$service" + playbook='site' fi - common_update_machine "$debops_controller_path" "$target_host_fqdn" "$only_role" "$machine_group" + common_update_machine "$debops_controller_path" "$target_host_fqdn" "$only_role" "$playbook" } deboco_print_usage() @@ -581,8 +578,8 @@ deboco_print_usage() echo " update_machine " echo " updates the machine using the debops controller in " echo - echo " update_machine_partially " - echo " updates the role on machine belonging to service using the debops controller in " + echo " update_machine_partially " + echo " updates the role on machine of playbook using the debops controller in " echo echo " configure_machine " echo " configures the machine using the debops controller in ". Equivalent to a init_machine followed by update_machine @@ -591,7 +588,11 @@ deboco_print_usage() echo " deboco --python-path /usr/bin/python3.10 init ~/work/debops/controllers/alambix" echo echo "example to update xymon server's configuration (here it's much faster to specify the service apache than an unspecified service: 16s instead of 3m 33s):" - echo " deboco update_machine_partially ~/debops/controllers/alambix monitoring.ipr.univ-rennes.fr role::xymon_server apache" + echo " deboco update_machine_partially ~/debops/controllers/alambix monitoring.ipr.univ-rennes.fr role::xymon_server service/apache" + echo + echo "example to update xymon client's configuration on alambix50 (the playbook that uses the role xymon (ie xymon client)) is currently ipr.post.debops):" + echo " deboco update_machine_partially ~/debops/controllers/alambix alambix50.ipr.univ-rennes.fr 'role::xymon' 'ipr.post.debops" + } deboco()