Merge "ansible: handle mount of /sys the same way IPA does it"
This commit is contained in:
commit
5feb626f64
@ -1 +1,3 @@
|
|||||||
tmp_rootfs_mount: /tmp/rootfs
|
tmp_rootfs_mount: /tmp/rootfs
|
||||||
|
umount_retry_count: 5
|
||||||
|
umount_retry_delay: 3
|
||||||
|
@ -48,9 +48,12 @@
|
|||||||
command: mount -o bind /{{ item }} {{ tmp_rootfs_mount }}/{{ item }}
|
command: mount -o bind /{{ item }} {{ tmp_rootfs_mount }}/{{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- dev
|
- dev
|
||||||
- sys
|
|
||||||
- proc
|
- proc
|
||||||
|
|
||||||
|
- name: mount /sys for chroot
|
||||||
|
become: yes
|
||||||
|
command: mount -t sysfs sysfs {{ tmp_rootfs_mount }}/sys
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: get grub version string
|
- name: get grub version string
|
||||||
become: yes
|
become: yes
|
||||||
@ -70,10 +73,14 @@
|
|||||||
become: yes
|
become: yes
|
||||||
command: chroot {{ tmp_rootfs_mount }} /bin/sh -c '{{ grub_config_cmd }} -o {{ grub_config_file }}'
|
command: chroot {{ tmp_rootfs_mount }} /bin/sh -c '{{ grub_config_cmd }} -o {{ grub_config_file }}'
|
||||||
always:
|
always:
|
||||||
- name: unmount dirs for chroot
|
- name: unmount /{{ item }} for chroot
|
||||||
become: yes
|
become: yes
|
||||||
command: umount {{ tmp_rootfs_mount }}/{{ item }}
|
command: umount {{ tmp_rootfs_mount }}/{{ item }}
|
||||||
|
register: task_result
|
||||||
|
retries: '{{ umount_retry_count }}'
|
||||||
|
delay: '{{ umount_retry_delay }}'
|
||||||
|
until: task_result.rc == 0
|
||||||
with_items:
|
with_items:
|
||||||
- dev
|
|
||||||
- sys
|
- sys
|
||||||
- proc
|
- proc
|
||||||
|
- dev
|
||||||
|
Loading…
x
Reference in New Issue
Block a user