diff --git a/ansible.cfg b/ansible.cfg index e98a2af86591c589fcf3252584258c0f55078cc5..7704d825bebd2b76666490f0a96af8a8df4735a7 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -8,6 +8,7 @@ vault_identity_list = ../lza_install_common.pass # Administrators can override this by using the "-i <inventoryfile>" CLI # argument. inventory = ../ansible_vaults/inventory.yml +# inventory = ./inventory.vmware.yml # Remote user name # We DELIBERATELY set this to an non-existent non-root username to make sure @@ -56,6 +57,8 @@ callbacks_enabled: yaml # Ignore these extensions when parsing a directory as inventory source. ignore_extensions = .pyc, .pyo, .swp, .bak, ~, .rpm, .md, .txt, ~, .orig, .ini, .cfg, .retry +# enable_plugins = vmware_vm_inventory + [ssh_connection] # Enabling pipelining reduces the number of SSH operations required to # execute a module on the remote server. This can result in a significant diff --git a/inventory.vmware.yml b/inventory.vmware.yml new file mode 100644 index 0000000000000000000000000000000000000000..363396318609e00f033eb4cee83bf228f48890a8 --- /dev/null +++ b/inventory.vmware.yml @@ -0,0 +1,11 @@ +--- +# https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_vm_inventory_inventory.html +plugin: community.vmware.vmware_vm_inventory +strict: false +hostname: "vCenter.server.fqdn" +username: 'SLUB\user_here' +password: "my_secret_password" +validate_certs: true +with_tags: true +groups: + VMs: true