Skip to content

Instantly share code, notes, and snippets.

@vladimir-ivanov
Last active March 14, 2021 19:25
Show Gist options
  • Save vladimir-ivanov/7b9f649365739c456babac262133e921 to your computer and use it in GitHub Desktop.
Save vladimir-ivanov/7b9f649365739c456babac262133e921 to your computer and use it in GitHub Desktop.
random playbook.yml
---
- name: This is a hello-world example
vars:
latest_version: "{{ version }}"
hosts: localhost
tasks:
- name: Create a file called '/tmp/testfile.txt' with the content 'hello world'.
copy:
content: hello worldn
dest: /tmp/text.txt
- name: Download zip
get_url:
url: 'https://file-examples-com.github.io/uploads/2017/{{ latest_version }}/zip_10MB.zip'
headers: ""
dest: /tmp
- name: unzip the zip
ansible.builtin.unarchive:
src: /tmp/zip_10MB.zip
dest: /tmp
# ansible-playbook playbook.yml --extra-vars "version=02"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment