Skip to content

Instantly share code, notes, and snippets.

@nleiva
Created July 1, 2021 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nleiva/927c346def12e77b855f549ef1b723db to your computer and use it in GitHub Desktop.
Save nleiva/927c346def12e77b855f549ef1b723db to your computer and use it in GitHub Desktop.
- name: Download Containerlab
ansible.builtin.get_url:
url: "{{ clab_download_url }}"
dest: "/tmp/clab.tar.gz"
mode: '0644'
- name: Unarchive Containerlab
ansible.builtin.unarchive:
src: "/tmp/clab.tar.gz"
dest: "/tmp"
remote_src: yes
mode: '0755'
- name: Copy Containerlab binary
ansible.builtin.copy:
src: "/tmp/containerlab"
dest: "{{ clab_dir }}/containerlab"
remote_src: yes
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: a+x
- name: Create a symbolic link
ansible.builtin.file:
src: "{{ clab_dir }}/containerlab"
dest: "{{ clab_dir }}/clab"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
state: link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment