diff --git a/liebchen.yml b/liebchen.yml index 5ae73f0..b8a83b1 100644 --- a/liebchen.yml +++ b/liebchen.yml @@ -184,10 +184,21 @@ - name: Update default dock confuguration command: dconf update - - name: Extract inventory number - command: grep -oP inventory_number=\K\d+ /etc/inventory_number.cmdline > /ect/inventory_number + - name: Search for string in file + command: + cmd: grep -oP inventory_number=\\K\\d+ /etc/inventory_number.cmdline + register: result + # Since it is a reporting task + # which needs to deliver a result in any case + failed_when: result.rc != 0 and result.rc != 1 + check_mode: false + changed_when: false + - name: Show result, if any + copy: + dest: /etc/inventory_number + content: | + {{ result.stdout_lines[0] }} + when: result.rc == 0 + - name: Enable login screen after install command: systemctl start systemd-logind.service - - name: Reboot - ansible.builtin.reboot: - reboot_timeout: 60