X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fremote-installer.git;a=blobdiff_plain;f=src%2Fscripts%2Fprint_hosts.py;fp=src%2Fscripts%2Fprint_hosts.py;h=66b21375cf4e0678bea6c0f19e1220b774d28b27;hp=0000000000000000000000000000000000000000;hb=a772a381a84dd9b906a06c314b113b997bce71f4;hpb=d8795ffdbafa06c8fbe943878dc4d51de1105d69 diff --git a/src/scripts/print_hosts.py b/src/scripts/print_hosts.py new file mode 100644 index 0000000..66b2137 --- /dev/null +++ b/src/scripts/print_hosts.py @@ -0,0 +1,20 @@ +# Copyright 2019 Nokia + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import yaml + +with open('/etc/userconfig/user_config.yaml') as f: + y = yaml.load(f) +for host in y['hosts'].keys(): + print host