From 1095900fd7fbf52106482671aaa7e1c5d0bd5239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Mon, 13 Feb 2023 17:06:06 +0100 Subject: [PATCH] chore: add preparations for using VMware vCenter based dynamic inventory --- ansible.cfg | 3 +++ inventory.vmware.yml | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 inventory.vmware.yml diff --git a/ansible.cfg b/ansible.cfg index e98a2af..7704d82 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 0000000..3633963 --- /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 -- GitLab