# How to configure VMware Snapshot

**URL:** <https://forum.ansible.com/t/how-to-configure-vmware-snapshot/37485>\
**Category:** AWX Project\
**Tags:** vmware, awx\
**Created:** [December 21, 2022, 9:55am UTC](https://forum.ansible.com/t/how-to-configure-vmware-snapshot/37485 "2022-12-21T09:55:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![K11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@K11](https://forum.ansible.com/u/K11)\
**Post date:** [December 21, 2022, 9:55am UTC](https://forum.ansible.com/t/how-to-configure-vmware-snapshot/37485/1 "2022-12-21T09:55:48Z")

</div>

Hi All

Just wanted to know what is the process to set AWX to run VMware snapshot?  
I found this [article](https://awstip.com/take-a-vmware-virtual-machine-snapshot-ansible-module-vmware-guest-snapshot-9e07f0d8a18f) but unsure how to perform this on the platform

As there is a playbook & a vars.yml to enter all the hostname etc  
How would do this as I want the project & Playbook to be stored in GitHub, without exposing the password and username?

I thought of putting it locally as a project on the box but get an error "

#### WARNING:There are no available playbook directories in /var/lib/awx/projects. Either that directory is empty, or all of the contents are already assigned to other projects. Create a new directory there and make sure the playbook files can be read by the “awx” system user, or have AWX directly retrieve your playbooks from source control using the Source Control Type option above."

Any advise would be great, I am also just a beginner on this platform

Thanks

 ![Screenshot 2022-12-21 at 09.48.27.png](https://us1.discourse-cdn.com/ansible/original/2X/d/d2118a7daa983705dcdf2e164b534aa7f3cb57fb.png)

 ![Screenshot 2022-12-21 at 09.48.43.png](https://us1.discourse-cdn.com/ansible/original/2X/2/2f5487d9c6b934112289bef84d6a25e798fd819d.png)

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [December 21, 2022, 7:46pm UTC](https://forum.ansible.com/t/how-to-configure-vmware-snapshot/37485/2 "2022-12-21T19:46:46Z")

</div>

Hi, it is recommended to store project files in SCM like github, bitbucket

if your project is private, then you’ll need a source control credential to attach to your project [https://docs.ansible.com/automation-controller/latest/html/userguide/credentials.html#source-control](https://docs.ansible.com/automation-controller/latest/html/userguide/credentials.html#source-control)

if you don’t want to enter username/password you can use an external manager vault and do a lookup, see these docs about configuring that [https://docs.ansible.com/automation-controller/latest/html/userguide/credential\_plugins.html#configure-and-link-secret-lookups](https://docs.ansible.com/automation-controller/latest/html/userguide/credential_plugins.html#configure-and-link-secret-lookups)

Let us know if you have more questions about this

AWX Team

---

<div class="post-metadata">

**Author:** ![K11](https://avatars.discourse-cdn.com/v4/letter/k/8dc957/32.png) [@K11](https://forum.ansible.com/u/K11)\
**Post date:** [December 21, 2022, 8:35pm UTC](https://forum.ansible.com/t/how-to-configure-vmware-snapshot/37485/3 "2022-12-21T20:35:17Z")

</div>

Hi

Thanks for the response

If I was to use the below and store in Github

Add the credentials, hostname etc for this within AWX would that work?

The questions I ask are basic for you but you have to excuse as I am newbie to this all

Thanks

```auto
---
- name: vm snapshot demo
  hosts: localhost
  become: false
  gather_facts: false
  collections:
    - community.vmware
  pre_tasks:
    - include_vars: vars.yml
  tasks:
    - name: create snapshot
      vmware_guest_snapshot:
        hostname: "{{ vcenter_hostname }}"
        username: "{{ vcenter_username }}"
        password: "{{ vcenter_password }}"
        datacenter: "{{ vcenter_datacenter }}"
        validate_certs: "{{ vcenter_validate_certs }}"
        name: "{{ vm_name }}"
        state: present
        snapshot_name: "Ansible Managed Snapshot"
        folder: "{{ vm_folder }}"
        description: "This snapshot is created by Ansible Playbook"

```
