distlist = platform.linux_distribution() return "centos" # if "centos" in distlist[0].lower(): # return "centos" # elif "ubuntu" in distlist[0].lower(): # return "ubuntu" # elif "debian" in distlist[0].lower(): # return "debian" # else: # console("Unsupported OS Type! Please create an issue at https://github.com/PackeTsar/freeztp/issues and include below information.") # console(platform.linux_distribution()) # sys.exit() OUTPUT: [root@v00utlrhl401 freeztp]# python ztp.py install No Config File Found! Please install app! ***** Are you sure you want to install FreeZTP using version v1.3.1?***** >>>>> If you are sure you want to do this, type in 'CONFIRM' and hit ENTER >>>>CONFIRM Binary file installed at /bin/ztp Config File Created at /etc/ztp/ztp.cfg Auto-complete script installed to /etc/profile.d/ztp-complete.sh Downloading tftpy library from https://github.com/PackeTsar/tftpy/archive/master.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1411 100 1411 0 0 3345 0 --:--:-- --:--:-- --:--:-- 3343 Installing tftpy library... gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now cp: cannot stat ‘tftpy-master/tftpy/’: No such file or directory Tftpy library installed Firewalld stopped and disabled Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. cc-apps | 2.9 kB 00:00:00 cc-epel-repo | 2.9 kB 00:00:00 cc-rhel-7-server-rpms | 2.9 kB 00:00:00 (1/2): cc-epel-repo/primary_db | 7.7 MB 00:00:00 (2/2): cc-rhel-7-server-rpms/primary_db | 58 MB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:7-12 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================= Package Arch Version Repository Size ============================================================================================================================= Installing: epel-release noarch 7-12 cc-epel-repo 15 k Transaction Summary ============================================================================================================================= Install 1 Package Total download size: 15 k Installed size: 24 k Downloading packages: epel-release-7-12.noarch.rpm | 15 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : epel-release-7-12.noarch 1/1 Verifying : epel-release-7-12.noarch 1/1 Installed: epel-release.noarch 0:7-12 Complete! Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo= ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable or subscription-manager repos --disable= 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=.skip_if_unavailable=true Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. cc-apps | 2.9 kB 00:00:00 cc-epel-repo | 2.9 kB 00:00:00 cc-rhel-7-server-rpms | 2.9 kB 00:00:00 One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo= ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable or subscription-manager repos --disable= 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=.skip_if_unavailable=true Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. cc-apps | 2.9 kB 00:00:00 cc-epel-repo | 2.9 kB 00:00:00 cc-rhel-7-server-rpms | 2.9 kB 00:00:00 One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo= ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable or subscription-manager repos --disable= 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=.skip_if_unavailable=true Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again sh: pip: command not found sh: pip: command not found sh: pip: command not found sh: pip: command not found sh: pip: command not found sh: pip: command not found sh: pip: command not found Created symlink from /etc/systemd/system/multi-user.target.wants/ztp.service to /etc/systemd/system/ztp.service. ZTP service installed at /etc/systemd/system/ztp.service Installing DHCPD... Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. cc-apps | 2.9 kB 00:00:00 cc-epel-repo | 2.9 kB 00:00:00 cc-rhel-7-server-rpms | 2.9 kB 00:00:00 One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo= ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable or subscription-manager repos --disable= 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=.skip_if_unavailable=true Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again Failed to execute operation: No such file or directory Sucking in config file... Retrying Module Imports... Failed! Install complete! Logout and log back into SSH to activate auto-complete