kubespray/contrib
Kenichi Omichi cc45e365ae
Fix print_hostnames of inventory.py (#8554)
When trying to run print_hostnames of inventory.py, it outputs the following
error:

 $ CONFIG_FILE=./test-hosts.yaml python3 ./inventory.py print_hostnames
 Traceback (most recent call last):
   File "./inventory.py", line 472, in <module>
     sys.exit(main())
   File "./inventory.py", line 467, in main
     KubesprayInventory(argv, CONFIG_FILE)
   File "./inventory.py", line 92, in __init__
     self.parse_command(changed_hosts[0], changed_hosts[1:])
   File "./inventory.py", line 415, in parse_command
     self.print_hostnames()
   File "./inventory.py", line 455, in print_hostnames
     print(' '.join(self.yaml_config['all']['hosts'].keys()))
 KeyError: 'all'

because it is missed to load a hosts config file before printing hostnames.
This fixes the issue.
2022-02-17 13:57:03 -08:00
..
aws_iam Added Missing AWS IAM Profiles and Policies 2017-03-03 15:30:07 +01:00
aws_inventory Clean up extra spaces of kubespray-aws-inventory.py (#7774) 2021-07-08 01:32:53 -07:00
azurerm Move to Ansible 3.4.0 (#7672) 2021-07-12 00:00:47 -07:00
dind Move to Ansible 3.4.0 (#7672) 2021-07-12 00:00:47 -07:00
inventory_builder Fix print_hostnames of inventory.py (#8554) 2022-02-17 13:57:03 -08:00
kvm-setup Use sysctl_file_path variable for all sysctl_file locations (#8395) 2022-02-01 08:12:10 -08:00
misc update rbac.authorization.k8s.io to non deprecated api-groups (#5517) 2020-04-14 13:14:04 -07:00
mitogen Fixed mitogen.yml (#8508) 2022-02-07 01:39:43 -08:00
network-storage Fix risky-file-permissions (#8370) 2022-01-09 01:51:12 -08:00
offline feat(offline): Improve generate_list.sh to generate offline file list using ansible (#8537) (#8538) 2022-02-13 23:19:28 -08:00
os-services Add definition check of disable_service_firewall (#7995) 2021-09-24 02:31:23 -07:00
packaging/rpm Update link for kubepsray project (#7758) 2021-07-05 01:12:55 -07:00
terraform terraform/gcp: Allow to change extra disk types (#8524) 2022-02-15 00:22:02 -08:00