如何配置ansible主机以通过服务原则连接到azure
我想通过我的Anble主机(RHEL 8.1 vm)通过服务原则连接到azure,以获取azure资源组中的vm列表。 如何自动配置此ansible主机 我已通过命令安装ansible[azure]: sudopip3安装ansible[azure] 我已经在主目录中的.azure中创建了一个凭据文件如何配置ansible主机以通过服务原则连接到azure,azure,ansible,Azure,Ansible,我想通过我的Anble主机(RHEL 8.1 vm)通过服务原则连接到azure,以获取azure资源组中的vm列表。 如何自动配置此ansible主机 我已通过命令安装ansible[azure]: sudopip3安装ansible[azure] 我已经在主目录中的.azure中创建了一个凭据文件 $ vim ~/.azure/credential [default] subscription_id=xxxxxx-xxxxx-xxxxxx-xxxx client_id=xxxxxx-x
$ vim ~/.azure/credential
[default]
subscription_id=xxxxxx-xxxxx-xxxxxx-xxxx
client_id=xxxxxx-xxxx-xxxx-xxxxx
secret=xxxxxxxxxx
tenant=xxxxx-xxxx-xxx-xxx-xxx
我跟着
创建“myazure_rm.yml”
当我运行以下程序时,我没有收到任何反馈:
[azureuser@vmaepansible002 ~]$ ansible all -m ping -i ./myazure_rm.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
我是否需要在此主机上安装azure cli才能完成此操作?我希望不会——还是我错了
[azureuser@vmaepansible002 ~]$ ansible all -m ping -i ./myazure_rm.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'