I have created a aks cluster from azure portal manually and trying to run few tasks like creating namespace etc from rhel 7 server using Ansible playbooks. (connected and able to run kubectl from rhel server)
which host value do I have to mention in the below playbook to work.
PLAYBOOK USED:
---
- hosts: x.x.x.x
gather_facts: no
become: yes
tasks:
- name: create name space
k8s:
name: testing
api_version: v1
kind: Namespace
state: present
~
Providing the rhel local IP from where I connected to aks clsuter throws me error while running playbook.
[testadmin@ansiblemaster test-project]$ ansible-playbook namespace.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
[WARNING]: Could not match supplied host pattern, ignoring: 20.219.84.38
PLAY [20.219.84.38] ************************************************************************************************************************************
skipping: no hosts matched
PLAY RECAP *********************************************************************************************************************************************