diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-22 05:48:40 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-22 05:48:40 +0900 |
commit | a630e8003465c8386f99236bc57f450c3cbb1ab4 (patch) | |
tree | 3a2dca22c5a144a221d2eae2dd9c150f3681a5af /roles/common/tasks | |
parent | a941d7972609f859f4de6d3fd6f6ceb6c065a94b (diff) | |
download | vyos-vm-images-a630e8003465c8386f99236bc57f450c3cbb1ab4.tar.gz vyos-vm-images-a630e8003465c8386f99236bc57f450c3cbb1ab4.zip |
Move install_package to common role
Diffstat (limited to 'roles/common/tasks')
-rw-r--r-- | roles/common/tasks/get_latest_iso.yml | 9 | ||||
-rw-r--r-- | roles/common/tasks/install_packages.yml | 12 | ||||
-rw-r--r-- | roles/common/tasks/main.yml | 11 |
3 files changed, 23 insertions, 9 deletions
diff --git a/roles/common/tasks/get_latest_iso.yml b/roles/common/tasks/get_latest_iso.yml new file mode 100644 index 0000000..82d07f8 --- /dev/null +++ b/roles/common/tasks/get_latest_iso.yml @@ -0,0 +1,9 @@ +- name: get latest_iso if iso is not defined + latest_iso: + when: iso is not defined + register: latest_iso + +- name: set latest_iso as vyos_iso_url + set_fact: + vyos_iso_url: "{{ latest_iso.latest_iso }}" + when: latest_iso is defined diff --git a/roles/common/tasks/install_packages.yml b/roles/common/tasks/install_packages.yml new file mode 100644 index 0000000..c5a2dbe --- /dev/null +++ b/roles/common/tasks/install_packages.yml @@ -0,0 +1,12 @@ +- name: Install required packages + become: yes + apt: + update_cache: yes + name: + - parted + - e2fsprogs + - gnupg + - qemu-utils + - python-lxml + - aufs-tools + state: present diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 82d07f8..f3f1395 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,9 +1,2 @@ -- name: get latest_iso if iso is not defined - latest_iso: - when: iso is not defined - register: latest_iso - -- name: set latest_iso as vyos_iso_url - set_fact: - vyos_iso_url: "{{ latest_iso.latest_iso }}" - when: latest_iso is defined +- include_tasks: install_packages.yml +- include_tasks: get_latest_iso.yml |