diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-08-16 09:15:41 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-08-16 09:33:43 +0000 |
commit | 94bcde24bae76a1845bf1444f9163cb0d732148b (patch) | |
tree | 3b03db32112abcc1faa1a86f29db03448b2cd155 /resources/tools/testbed-setup | |
parent | a418d65968ff5afeb7bcb3f10803667d31b1d42b (diff) |
FIX: Small errors in ansible
- that prevents installation
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I4fe4694ab7479481481aacc2eb550058bd7618e6
Diffstat (limited to 'resources/tools/testbed-setup')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/common/tasks/kernel_install.yaml | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/common/tasks/kernel_install.yaml b/resources/tools/testbed-setup/ansible/roles/common/tasks/kernel_install.yaml index 9cfa415330..5f8a0590bf 100644 --- a/resources/tools/testbed-setup/ansible/roles/common/tasks/kernel_install.yaml +++ b/resources/tools/testbed-setup/ansible/roles/common/tasks/kernel_install.yaml @@ -1,71 +1,79 @@ --- # file: roles/common/tasks/kernel_install.yaml -- name: Backup remote initramfs modules +- name: Kernel VM: Backup remote initramfs modules copy: src: '/etc/initramfs-tools/modules' dest: '/tmp/initramfs_modules.bkp' remote_src: yes + ignore_errors: yes + register: __initramfs_modules_backuped tags: install-kernel-image -- name: Update remote initramfs modules - copy: - src: '../files/initramfs_modules' - dest: '/etc/initramfs-tools/modules' - tags: install-kernel-image - -- name: Backup remote initramfs resume config +- name: Kernel VM: Backup remote initramfs resume config copy: src: '/etc/initramfs-tools/conf.d/resume' dest: '/tmp/initramfs-resume.bkp' remote_src: yes + ignore_errors: yes + register: __initramfs_resume_backuped + tags: install-kernel-image + +- name: Kernel VM: Update remote initramfs modules + copy: + src: '../files/initramfs_modules' + dest: '/etc/initramfs-tools/modules' tags: install-kernel-image -- name: Update remote initramfs resume config +- name: Kernel VM: Update remote initramfs resume config copy: src: '../files/initramfs_resume' dest: '/etc/initramfs-tools/conf.d/resume' tags: install-kernel-image -- name: Create target kernel dir +- name: Kernel VM: Create target kernel dir file: path: '/opt/boot' state: 'directory' tags: install-kernel-image -- name: Build initrd image +- name: Kernel VM: Build initrd image shell: 'update-initramfs -k {{ ansible_kernel }} -c -b /opt/boot' tags: install-kernel-image -- name: Copy corresponding kernel img +- name: Kernel VM: Copy corresponding kernel img copy: src: '/boot/vmlinuz-{{ ansible_kernel }}' dest: '/opt/boot/vmlinuz-{{ ansible_kernel }}' remote_src: yes tags: install-kernel-image -- name: Restore remote initramfs modules +- name: Kernel VM: Restore remote initramfs modules copy: src: '/tmp/initramfs_modules.bkp' dest: '/etc/initramfs-tools/modules' remote_src: yes + when: __initramfs_modules_backuped tags: install-kernel-image -- name: Remove remote backup initramfs modules +- name: Kernel VM: Remove remote backup initramfs modules file: path: '/tmp/initramfs_modules.bkp' state: 'absent' + when: __initramfs_modules_backuped tags: install-kernel-image -- name: Restore remote initramfs resume config +- name: Kernel VM: Restore remote initramfs resume config copy: src: '/tmp/initramfs-resume.bkp' dest: '/etc/initramfs-tools/conf.d/resume' remote_src: yes + when: __initramfs_resume_backuped tags: install-kernel-image -- name: Remove remote backup initramfs resume config +- name: Kernel VM: Remove remote backup initramfs resume config file: path: '/tmp/initramfs-resume.bkp' state: 'absent' + when: __initramfs_resume_backuped tags: install-kernel-image |