[libvirt] [jenkins-ci PATCH 0/2] lcitool: Prepare for openSUSE

A couple of changes that we need to have in before openSUSE can be added, as already mentioned on the mailing list. Andrea Bolognani (2): lcitool: Search /etc and /usr/local/etc separately lcitool: Create group and user separately guests/playbooks/update/tasks/paths.yml | 2 +- guests/playbooks/update/tasks/users.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.23.0

Some operating systems (notably openSUSE) have the former but not the latter, which results in the single call to find(1) we've used so far to fail. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- I tried implementing my original suggestion and it turned out to be much worse than what Jim and Fabiano proposed, so I've decided to go for the latter (except fixed ;). guests/playbooks/update/tasks/paths.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guests/playbooks/update/tasks/paths.yml b/guests/playbooks/update/tasks/paths.yml index 770680e..aada1f3 100644 --- a/guests/playbooks/update/tasks/paths.yml +++ b/guests/playbooks/update/tasks/paths.yml @@ -17,7 +17,7 @@ - su - name: 'Look for files' - shell: 'find /etc /usr/local/etc -name {{ item }} 2>/dev/null' + shell: '(find /usr/local/etc -name {{ item }}; find /etc -name {{ item }}) 2>/dev/null' register: find with_items: - sudoers -- 2.23.0

Some operating systems (notably openSUSE) don't create a group with the same name when a user is created: create it explicitly so that we can later rely on it being present. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/playbooks/update/tasks/users.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guests/playbooks/update/tasks/users.yml b/guests/playbooks/update/tasks/users.yml index 0470686..a6fb0aa 100644 --- a/guests/playbooks/update/tasks/users.yml +++ b/guests/playbooks/update/tasks/users.yml @@ -18,9 +18,15 @@ line: 'PermitRootLogin without-password' state: present +- name: '{{ flavor }}: Create group' + group: + name: '{{ flavor }}' + state: present + - name: '{{ flavor }}: Create user account' user: name: '{{ flavor }}' + group: '{{ flavor }}' comment: '{{ flavor }}' password: '*' shell: '{{ bash }}' -- 2.23.0

On Mon, Dec 2, 2019 at 7:32 PM Andrea Bolognani <abologna@redhat.com> wrote:
A couple of changes that we need to have in before openSUSE can be added, as already mentioned on the mailing list.
Andrea Bolognani (2): lcitool: Search /etc and /usr/local/etc separately lcitool: Create group and user separately
guests/playbooks/update/tasks/paths.yml | 2 +- guests/playbooks/update/tasks/users.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> And also feels like Signed-off-by: Fabiano Fidêncio <fidencio@redat.com> :-) Best Regards, -- Fabiano Fidêncio

On Mon, 2019-12-02 at 20:01 +0100, Fabiano Fidêncio wrote:
On Mon, Dec 2, 2019 at 7:32 PM Andrea Bolognani <abologna@redhat.com> wrote:
A couple of changes that we need to have in before openSUSE can be added, as already mentioned on the mailing list.
Andrea Bolognani (2): lcitool: Search /etc and /usr/local/etc separately lcitool: Create group and user separately
guests/playbooks/update/tasks/paths.yml | 2 +- guests/playbooks/update/tasks/users.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-)
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> And also feels like Signed-off-by: Fabiano Fidêncio <fidencio@redat.com> :-)
Having both a S-o-b and a R-b from the same person seemed a bit silly, so I've gone with only the former :) -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Fabiano Fidêncio