[libvirt] [libvirt-jenkins-ci PATCH 0/5] Add unattended guest installation support

I, for one, welcome our new robot overlords. Andrea Bolognani (5): ansible: Remove bootstrap phase ansible: Introduce the 'manage' tool ansible: Add unattended installation support ansible: Update documentation guests: Rename from 'ansible' ansible/Makefile | 12 -- ansible/README.markdown | 60 ---------- ansible/bootstrap.yml | 15 --- {ansible => guests}/.gitignore | 0 guests/README.markdown | 80 +++++++++++++ {ansible => guests}/ansible.cfg | 0 guests/group_vars/all/install.yml | 10 ++ {ansible => guests}/group_vars/all/main.yml | 1 + guests/host_vars/libvirt-centos-6/install.yml | 3 + .../host_vars/libvirt-centos-6/main.yml | 0 .../host_vars/libvirt-centos-6/vault.yml | 0 guests/host_vars/libvirt-centos-7/install.yml | 3 + .../host_vars/libvirt-centos-7/main.yml | 0 .../host_vars/libvirt-centos-7/vault.yml | 0 guests/host_vars/libvirt-debian-8/install.yml | 3 + .../host_vars/libvirt-debian-8/main.yml | 0 .../host_vars/libvirt-debian-8/vault.yml | 0 guests/host_vars/libvirt-debian-9/install.yml | 3 + .../host_vars/libvirt-debian-9/main.yml | 0 .../host_vars/libvirt-debian-9/vault.yml | 0 guests/host_vars/libvirt-fedora-25/install.yml | 3 + .../host_vars/libvirt-fedora-25/main.yml | 0 .../host_vars/libvirt-fedora-25/vault.yml | 0 guests/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-26/main.yml | 0 .../host_vars/libvirt-fedora-26/vault.yml | 0 .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/main.yml | 0 .../host_vars/libvirt-fedora-rawhide/vault.yml | 0 .../host_vars/libvirt-freebsd-10/main.yml | 0 .../host_vars/libvirt-freebsd-10/vault.yml | 0 .../host_vars/libvirt-freebsd-11/main.yml | 0 .../host_vars/libvirt-freebsd-11/vault.yml | 0 guests/host_vars/libvirt-ubuntu-12/install.yml | 3 + .../host_vars/libvirt-ubuntu-12/main.yml | 0 .../host_vars/libvirt-ubuntu-12/vault.yml | 0 guests/host_vars/libvirt-ubuntu-14/install.yml | 3 + .../host_vars/libvirt-ubuntu-14/main.yml | 0 .../host_vars/libvirt-ubuntu-14/vault.yml | 0 guests/host_vars/libvirt-ubuntu-16/install.yml | 3 + .../host_vars/libvirt-ubuntu-16/main.yml | 0 .../host_vars/libvirt-ubuntu-16/vault.yml | 0 {ansible => guests}/inventory | 0 guests/kickstart.cfg | 60 ++++++++++ guests/manage | 131 +++++++++++++++++++++ guests/preseed.cfg | 85 +++++++++++++ {ansible => guests}/site.yml | 8 ++ {ansible => guests}/tasks/base.yml | 0 {ansible => guests}/tasks/bootstrap.yml | 0 {ansible => guests}/tasks/compat.yml | 0 {ansible => guests}/tasks/jenkins.yml | 0 {ansible => guests}/tasks/packages.yml | 0 {ansible => guests}/templates/jenkins.service.j2 | 0 {ansible => guests}/vars/mappings.yml | 0 {ansible => guests}/vars/projects/base.yml | 0 {ansible => guests}/vars/projects/jenkins.yml | 0 {ansible => guests}/vars/projects/libosinfo.yml | 0 {ansible => guests}/vars/projects/libvirt-cim.yml | 0 {ansible => guests}/vars/projects/libvirt-glib.yml | 0 .../vars/projects/libvirt-go-xml.yml | 0 {ansible => guests}/vars/projects/libvirt-go.yml | 0 {ansible => guests}/vars/projects/libvirt-perl.yml | 0 .../vars/projects/libvirt-python.yml | 0 .../vars/projects/libvirt-sandbox.yml | 0 {ansible => guests}/vars/projects/libvirt-tck.yml | 0 {ansible => guests}/vars/projects/libvirt.yml | 0 .../vars/projects/osinfo-db-tools.yml | 0 {ansible => guests}/vars/projects/osinfo-db.yml | 0 {ansible => guests}/vars/projects/virt-manager.yml | 0 {ansible => guests}/vars/projects/virt-viewer.yml | 0 70 files changed, 405 insertions(+), 87 deletions(-) delete mode 100644 ansible/Makefile delete mode 100644 ansible/README.markdown delete mode 100644 ansible/bootstrap.yml rename {ansible => guests}/.gitignore (100%) create mode 100644 guests/README.markdown rename {ansible => guests}/ansible.cfg (100%) create mode 100644 guests/group_vars/all/install.yml rename {ansible => guests}/group_vars/all/main.yml (91%) create mode 100644 guests/host_vars/libvirt-centos-6/install.yml rename {ansible => guests}/host_vars/libvirt-centos-6/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-6/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-centos-7/install.yml rename {ansible => guests}/host_vars/libvirt-centos-7/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-7/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-debian-8/install.yml rename {ansible => guests}/host_vars/libvirt-debian-8/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-8/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-debian-9/install.yml rename {ansible => guests}/host_vars/libvirt-debian-9/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-9/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-fedora-25/install.yml rename {ansible => guests}/host_vars/libvirt-fedora-25/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-25/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-fedora-26/install.yml rename {ansible => guests}/host_vars/libvirt-fedora-26/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-26/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-fedora-rawhide/install.yml rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-10/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-10/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-11/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-11/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-ubuntu-12/install.yml rename {ansible => guests}/host_vars/libvirt-ubuntu-12/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-12/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-ubuntu-14/install.yml rename {ansible => guests}/host_vars/libvirt-ubuntu-14/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-14/vault.yml (100%) create mode 100644 guests/host_vars/libvirt-ubuntu-16/install.yml rename {ansible => guests}/host_vars/libvirt-ubuntu-16/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-16/vault.yml (100%) rename {ansible => guests}/inventory (100%) create mode 100644 guests/kickstart.cfg create mode 100755 guests/manage create mode 100644 guests/preseed.cfg rename {ansible => guests}/site.yml (83%) rename {ansible => guests}/tasks/base.yml (100%) rename {ansible => guests}/tasks/bootstrap.yml (100%) rename {ansible => guests}/tasks/compat.yml (100%) rename {ansible => guests}/tasks/jenkins.yml (100%) rename {ansible => guests}/tasks/packages.yml (100%) rename {ansible => guests}/templates/jenkins.service.j2 (100%) rename {ansible => guests}/vars/mappings.yml (100%) rename {ansible => guests}/vars/projects/base.yml (100%) rename {ansible => guests}/vars/projects/jenkins.yml (100%) rename {ansible => guests}/vars/projects/libosinfo.yml (100%) rename {ansible => guests}/vars/projects/libvirt-cim.yml (100%) rename {ansible => guests}/vars/projects/libvirt-glib.yml (100%) rename {ansible => guests}/vars/projects/libvirt-go-xml.yml (100%) rename {ansible => guests}/vars/projects/libvirt-go.yml (100%) rename {ansible => guests}/vars/projects/libvirt-perl.yml (100%) rename {ansible => guests}/vars/projects/libvirt-python.yml (100%) rename {ansible => guests}/vars/projects/libvirt-sandbox.yml (100%) rename {ansible => guests}/vars/projects/libvirt-tck.yml (100%) rename {ansible => guests}/vars/projects/libvirt.yml (100%) rename {ansible => guests}/vars/projects/osinfo-db-tools.yml (100%) rename {ansible => guests}/vars/projects/osinfo-db.yml (100%) rename {ansible => guests}/vars/projects/virt-manager.yml (100%) rename {ansible => guests}/vars/projects/virt-viewer.yml (100%) -- 2.13.6

Having to bootstrap the guest as a separate phase is annoying and can be avoided by assuming the root password is well-known. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/Makefile | 5 +---- ansible/bootstrap.yml | 15 --------------- ansible/group_vars/all/main.yml | 1 + ansible/site.yml | 8 ++++++++ 4 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 ansible/bootstrap.yml diff --git a/ansible/Makefile b/ansible/Makefile index 39ebe52..6af7ae3 100644 --- a/ansible/Makefile +++ b/ansible/Makefile @@ -3,10 +3,7 @@ all: site: @ansible-playbook site.yml -bootstrap: - @ansible-playbook --ask-pass bootstrap.yml - clean: @rm -f *.retry log -.PHONY: all site bootstrap clean +.PHONY: all site clean diff --git a/ansible/bootstrap.yml b/ansible/bootstrap.yml deleted file mode 100644 index 544dd9d..0000000 --- a/ansible/bootstrap.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: all - gather_facts: no - - tasks: - - # Bootstrap Ansible itself - - include: tasks/bootstrap.yml - -- hosts: all - - tasks: - - # Prepare the base environment - - include: tasks/base.yml diff --git a/ansible/group_vars/all/main.yml b/ansible/group_vars/all/main.yml index 81b7d43..493a51d 100644 --- a/ansible/group_vars/all/main.yml +++ b/ansible/group_vars/all/main.yml @@ -1,5 +1,6 @@ --- ansible_user: root +ansible_ssh_pass: root jenkins_url: https://ci.centos.org/computer/{{ inventory_hostname }}/slave-agent.jnlp diff --git a/ansible/site.yml b/ansible/site.yml index e6cf10d..9c75dcb 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -1,5 +1,13 @@ --- - hosts: all + gather_facts: no + + tasks: + + # Bootstrap Ansible itself + - include: tasks/bootstrap.yml + +- hosts: all vars_files: - vars/mappings.yml -- 2.13.6

On Mon, Oct 16, 2017 at 06:02:04PM +0200, Andrea Bolognani wrote:
Having to bootstrap the guest as a separate phase is annoying and can be avoided by assuming the root password is well-known.
I'm not sure about this. Yes the password will be well known for us but I would rather have it generated and stored somewhere on the host. The guests are hidden from internet but they are still connected to jenkins and are executing commands provided by jenkins. Maybe I'm just too paranoid :). Pavel

On Tue, Oct 17, 2017 at 06:05:23PM +0200, Pavel Hrdina wrote:
On Mon, Oct 16, 2017 at 06:02:04PM +0200, Andrea Bolognani wrote:
Having to bootstrap the guest as a separate phase is annoying and can be avoided by assuming the root password is well-known.
I'm not sure about this. Yes the password will be well known for us but I would rather have it generated and stored somewhere on the host.
The guests are hidden from internet but they are still connected to jenkins and are executing commands provided by jenkins. Maybe I'm just too paranoid :).
Could we just generate a random root password, but install SSH public keys and set SSH to only permit public key auth. That way if there is compromised code that we build for whatever reasons, it can't use 'su' to escalate to root in the build VMs. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, Oct 17, 2017 at 05:11:40PM +0100, Daniel P. Berrange wrote:
On Tue, Oct 17, 2017 at 06:05:23PM +0200, Pavel Hrdina wrote:
On Mon, Oct 16, 2017 at 06:02:04PM +0200, Andrea Bolognani wrote:
Having to bootstrap the guest as a separate phase is annoying and can be avoided by assuming the root password is well-known.
I'm not sure about this. Yes the password will be well known for us but I would rather have it generated and stored somewhere on the host.
The guests are hidden from internet but they are still connected to jenkins and are executing commands provided by jenkins. Maybe I'm just too paranoid :).
Could we just generate a random root password, but install SSH public keys and set SSH to only permit public key auth.
That's the idea, having the root password stored on the host is just if something goes wrong and you need to use serial console. Pavel

On Tue, 2017-10-17 at 18:16 +0200, Pavel Hrdina wrote:
Could we just generate a random root password, but install SSH public keys and set SSH to only permit public key auth.
That's the idea, having the root password stored on the host is just if something goes wrong and you need to use serial console.
Yeah, I like it. I'll figure out something. -- Andrea Bolognani / Red Hat / Virtualization

This script replaces the existing Makefile, and will be extended to provide more functionality in future commits. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/Makefile | 9 --------- ansible/manage | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 9 deletions(-) delete mode 100644 ansible/Makefile create mode 100755 ansible/manage diff --git a/ansible/Makefile b/ansible/Makefile deleted file mode 100644 index 6af7ae3..0000000 --- a/ansible/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: - -site: - @ansible-playbook site.yml - -clean: - @rm -f *.retry log - -.PHONY: all site clean diff --git a/ansible/manage b/ansible/manage new file mode 100755 index 0000000..46bec6c --- /dev/null +++ b/ansible/manage @@ -0,0 +1,57 @@ +#!/bin/sh + +PROGRAM_NAME="$0" + +# ------------------- +# Utility functions +# ------------------- + +# die MESSAGE +# +# Abort the program after displaying $MESSAGE on standard error. +die() { + echo "$1" >&2 + exit 1 +} + +# ---------------------- +# User-visible actions +# ---------------------- + +do_help() { + echo "\ +Usage: $PROGRAM_NAME ACTION [OPTIONS] + +Actions: + list List known guests + prepare GUEST Prepare or update GUEST. Can be run as many times as needed + update GUEST Alias for prepare + help Display this help" +} + +do_list() { + INVENTORY=$(grep "^inventory\\s*=" ansible.cfg 2>/dev/null | sed "s/^.*=\\s*//g") + INVENTORY=${INVENTORY:-/etc/ansible/hosts} + + grep -v '^\[' "$INVENTORY" | sort -u +} + +do_prepare() { + GUEST="$1" + + test "$GUEST" || { + die "Usage: $PROGRAM_NAME prepare GUEST" + } + do_list | grep -q "$GUEST" || { + die "$PROGRAM_NAME: $GUEST: Unknown guest" + } + + ansible-playbook -l "$GUEST" site.yml +} + +case "$1" in + list) do_list ;; + prepare|update) do_prepare "$2" ;; + *help) do_help ;; + *) die "Usage: $PROGRAM_NAME ACTION [OPTIONS]" ;; +esac -- 2.13.6

On Mon, Oct 16, 2017 at 06:02:05PM +0200, Andrea Bolognani wrote:
This script replaces the existing Makefile, and will be extended to provide more functionality in future commits.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/Makefile | 9 --------- ansible/manage | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 9 deletions(-) delete mode 100644 ansible/Makefile create mode 100755 ansible/manage
diff --git a/ansible/Makefile b/ansible/Makefile deleted file mode 100644 index 6af7ae3..0000000 --- a/ansible/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -all: - -site: - @ansible-playbook site.yml - -clean: - @rm -f *.retry log - -.PHONY: all site clean diff --git a/ansible/manage b/ansible/manage new file mode 100755 index 0000000..46bec6c --- /dev/null +++ b/ansible/manage @@ -0,0 +1,57 @@ +#!/bin/sh + +PROGRAM_NAME="$0" + +# ------------------- +# Utility functions +# ------------------- + +# die MESSAGE +# +# Abort the program after displaying $MESSAGE on standard error. +die() { + echo "$1" >&2 + exit 1 +} + +# ---------------------- +# User-visible actions +# ---------------------- + +do_help() { + echo "\ +Usage: $PROGRAM_NAME ACTION [OPTIONS] + +Actions: + list List known guests + prepare GUEST Prepare or update GUEST. Can be run as many times as needed + update GUEST Alias for prepare + help Display this help" +} + +do_list() { + INVENTORY=$(grep "^inventory\\s*=" ansible.cfg 2>/dev/null | sed "s/^.*=\\s*//g") + INVENTORY=${INVENTORY:-/etc/ansible/hosts}
I don't think that there is a need to include system-wide inventory since we have our own inventory and we don't use the system-wide inventory at all.
+ + grep -v '^\[' "$INVENTORY" | sort -u +} + +do_prepare() { + GUEST="$1" + + test "$GUEST" || { + die "Usage: $PROGRAM_NAME prepare GUEST" + } + do_list | grep -q "$GUEST" || { + die "$PROGRAM_NAME: $GUEST: Unknown guest" + } + + ansible-playbook -l "$GUEST" site.yml +} + +case "$1" in + list) do_list ;; + prepare|update) do_prepare "$2" ;; + *help) do_help ;; + *) die "Usage: $PROGRAM_NAME ACTION [OPTIONS]" ;;
How about grouping *help) and *) together? I was pretending to be a basic user and I've run this script without any option at all and this was the only output. So it would be nice to print the help itself or mention that there is some "--help" option.
+esac
Pavel

On Tue, 2017-10-17 at 15:21 +0200, Pavel Hrdina wrote:
+do_list() { + INVENTORY=$(grep "^inventory\\s*=" ansible.cfg 2>/dev/null | sed "s/^.*=\\s*//g") + INVENTORY=${INVENTORY:-/etc/ansible/hosts}
I don't think that there is a need to include system-wide inventory since we have our own inventory and we don't use the system-wide inventory at all.
Good point. I turned the absence of the local inventory file into an error, and...
+ grep -v '^\[' "$INVENTORY" | sort -u
... improved the regular expression so that empty lines and comments will be ignored in addition to group names.
+case "$1" in + list) do_list ;; + prepare|update) do_prepare "$2" ;; + *help) do_help ;; + *) die "Usage: $PROGRAM_NAME ACTION [OPTIONS]" ;;
How about grouping *help) and *) together? I was pretending to be a basic user and I've run this script without any option at all and this was the only output. So it would be nice to print the help itself or mention that there is some "--help" option.
I went one step further and dropped the command-specific error message in favor of displaying the help text. One less string, and it's actually more informative :) -- Andrea Bolognani / Red Hat / Virtualization

The 'manage' tool can now be used to install most known guests without requiring user interaction. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 + ansible/host_vars/libvirt-centos-7/install.yml | 3 + ansible/host_vars/libvirt-debian-8/install.yml | 3 + ansible/host_vars/libvirt-debian-9/install.yml | 3 + ansible/host_vars/libvirt-fedora-25/install.yml | 3 + ansible/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-12/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/install.yml | 3 + ansible/kickstart.cfg | 60 +++++++++++++++ ansible/manage | 74 +++++++++++++++++++ ansible/preseed.cfg | 85 ++++++++++++++++++++++ 14 files changed, 259 insertions(+) create mode 100644 ansible/group_vars/all/install.yml create mode 100644 ansible/host_vars/libvirt-centos-6/install.yml create mode 100644 ansible/host_vars/libvirt-centos-7/install.yml create mode 100644 ansible/host_vars/libvirt-debian-8/install.yml create mode 100644 ansible/host_vars/libvirt-debian-9/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-12/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/install.yml create mode 100644 ansible/kickstart.cfg create mode 100644 ansible/preseed.cfg diff --git a/ansible/group_vars/all/install.yml b/ansible/group_vars/all/install.yml new file mode 100644 index 0000000..714328e --- /dev/null +++ b/ansible/group_vars/all/install.yml @@ -0,0 +1,10 @@ +--- +# Sizes are in GiB +install_virt_type: kvm +install_arch: x86_64 +install_machine: pc +install_vcpus: 2 +install_memory_size: 2 +install_disk_size: 10 +install_storage_pool: default +install_network: default diff --git a/ansible/host_vars/libvirt-centos-6/install.yml b/ansible/host_vars/libvirt-centos-6/install.yml new file mode 100644 index 0000000..3a9459b --- /dev/null +++ b/ansible/host_vars/libvirt-centos-6/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://mirror.centos.org/centos/6/os/x86_64/ +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-centos-7/install.yml b/ansible/host_vars/libvirt-centos-7/install.yml new file mode 100644 index 0000000..f003b89 --- /dev/null +++ b/ansible/host_vars/libvirt-centos-7/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://mirror.centos.org/centos/7/os/x86_64/ +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-debian-8/install.yml b/ansible/host_vars/libvirt-debian-8/install.yml new file mode 100644 index 0000000..a2c8341 --- /dev/null +++ b/ansible/host_vars/libvirt-debian-8/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://deb.debian.org/debian/dists/jessie/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-debian-9/install.yml b/ansible/host_vars/libvirt-debian-9/install.yml new file mode 100644 index 0000000..5b1da76 --- /dev/null +++ b/ansible/host_vars/libvirt-debian-9/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://deb.debian.org/debian/dists/stretch/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-fedora-25/install.yml b/ansible/host_vars/libvirt-fedora-25/install.yml new file mode 100644 index 0000000..bb4bde3 --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-25/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_6... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-fedora-26/install.yml b/ansible/host_vars/libvirt-fedora-26/install.yml new file mode 100644 index 0000000..eff160d --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-26/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/releases/26/Server/x86_6... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-fedora-rawhide/install.yml b/ansible/host_vars/libvirt-fedora-rawhide/install.yml new file mode 100644 index 0000000..2216e81 --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-rawhide/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Ever... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-12/install.yml b/ansible/host_vars/libvirt-ubuntu-12/install.yml new file mode 100644 index 0000000..997304f --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-12/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-14/install.yml b/ansible/host_vars/libvirt-ubuntu-14/install.yml new file mode 100644 index 0000000..d7862a5 --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-14/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-16/install.yml b/ansible/host_vars/libvirt-ubuntu-16/install.yml new file mode 100644 index 0000000..a7bb2da --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-16/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/kickstart.cfg b/ansible/kickstart.cfg new file mode 100644 index 0000000..c28f275 --- /dev/null +++ b/ansible/kickstart.cfg @@ -0,0 +1,60 @@ +# Installer configuration +# +# Perform a text based installation followed by a reboot, and disable +# the first boot assistant +text +install +reboot +firstboot --disable + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +lang en_US.UTF-8 +keyboard us +timezone --utc Europe/Prague + + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +authconfig --enableshadow --passalgo=sha512 +rootpw --plaintext root + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +ignoredisk --only-use=vda +zerombr +clearpart --none +part / --fstype=ext4 --size=2048 --grow +part swap --fstype=swap --size=2048 + + +# Install bootloader +# +# The bootloader will be installed in the MBR +bootloader --location=mbr --timeout=1 + + +# Configure networking +# +# The only network interface available to the guest will come up +# at boot using IPv4-only DHCP +network --bootproto=dhcp --noipv6 --activate --onboot=yes + + +# Software installation +# +# Only install the very base packages: everything else will be +# installed later using Ansible +%packages +@core +%end diff --git a/ansible/manage b/ansible/manage index 46bec6c..d84b8b0 100755 --- a/ansible/manage +++ b/ansible/manage @@ -14,6 +14,33 @@ die() { exit 1 } +# yaml_var FILE VAR +# +# Read $FILE and output the value of YAML variable $VAR. Only trivial YAML +# values are supported, eg. strings and numbers that don't depend on the +# value of other variables. That's enough for our use case. +yaml_var() { + grep "^$2:\\s*" "$1" 2>/dev/null | tail -1 | sed "s/$2:\\s*//g" +} + +# load_config FILE +# +# Read all known configuration variables from $FILE and set them in the +# environment. Configuration variables that have already been set in +# the environment will not be updated. +load_config() { + INSTALL_URL=${INSTALL_URL:-$(yaml_var "$1" install_url)} + INSTALL_CONFIG=${INSTALL_CONFIG:-$(yaml_var "$1" install_config)} + INSTALL_VIRT_TYPE=${INSTALL_ARCH:-$(yaml_var "$1" install_virt_type)} + INSTALL_ARCH=${INSTALL_ARCH:-$(yaml_var "$1" install_arch)} + INSTALL_MACHINE=${INSTALL_MACHINE:-$(yaml_var "$1" install_machine)} + INSTALL_VCPUS=${INSTALL_VCPUS:-$(yaml_var "$1" install_vcpus)} + INSTALL_MEMORY_SIZE=${INSTALL_MEMORY_SIZE:-$(yaml_var "$1" install_memory_size)} + INSTALL_DISK_SIZE=${INSTALL_DISK_SIZE:-$(yaml_var "$1" install_disk_size)} + INSTALL_STORAGE_POOL=${INSTALL_STORAGE_POOL:-$(yaml_var "$1" install_storage_pool)} + INSTALL_NETWORK=${INSTALL_NETWORK:-$(yaml_var "$1" install_network)} +} + # ---------------------- # User-visible actions # ---------------------- @@ -24,6 +51,7 @@ Usage: $PROGRAM_NAME ACTION [OPTIONS] Actions: list List known guests + install GUEST Install GUEST prepare GUEST Prepare or update GUEST. Can be run as many times as needed update GUEST Alias for prepare help Display this help" @@ -36,6 +64,51 @@ do_list() { grep -v '^\[' "$INVENTORY" | sort -u } +do_install() +{ + GUEST="$1" + + test "$GUEST" || { + die "Usage: $PROGRAM_NAME install GUEST" + } + do_list | grep -q "$GUEST" || { + die "$PROGRAM_NAME: $GUEST: Unknown guest" + } + test -f "host_vars/$GUEST/install.yml" || { + die "$PROGRAM_NAME: $GUEST: Missing configuration, guest must be installed manually" + } + + # Load configuration files. Values don't get overwritten after being + # set the first time, so loading the host-specific configuration before + # the group configuration ensures overrides work as expected + load_config "host_vars/$GUEST/install.yml" + load_config "group_vars/all/install.yml" + + # Both memory size and disk size use GiB as unit, but virt-install wants + # disk size in GiB and memory size in *MiB*, so perform conversion here + INSTALL_MEMORY_SIZE=$(expr "$INSTALL_MEMORY_SIZE" \* 1024 2>/dev/null) + + # preseed files must use a well-known name to be picked up by d-i; + # for kickstart files, we can use whatever name we please but we need + # to point anaconda in the right direction through a kernel argument + case "$INSTALL_CONFIG" in + *kickstart*|*ks*) EXTRA_ARGS="ks=file:/${INSTALL_CONFIG##*/}" ;; + esac + + virt-install \ + --name "$GUEST" \ + --location "$INSTALL_URL" \ + --virt-type "$INSTALL_VIRT_TYPE" \ + --arch "$INSTALL_ARCH" \ + --machine "$INSTALL_MACHINE" \ + --vcpus "$INSTALL_VCPUS" \ + --ram "$INSTALL_MEMORY_SIZE" \ + --disk "size=$INSTALL_DISK_SIZE,pool=$INSTALL_STORAGE_POOL,bus=virtio" \ + --network "network=$INSTALL_NETWORK,model=virtio" \ + --initrd-inject "$INSTALL_CONFIG" \ + --extra-args "$EXTRA_ARGS" +} + do_prepare() { GUEST="$1" @@ -51,6 +124,7 @@ do_prepare() { case "$1" in list) do_list ;; + install) do_install "$2" ;; prepare|update) do_prepare "$2" ;; *help) do_help ;; *) die "Usage: $PROGRAM_NAME ACTION [OPTIONS]" ;; diff --git a/ansible/preseed.cfg b/ansible/preseed.cfg new file mode 100644 index 0000000..192118e --- /dev/null +++ b/ansible/preseed.cfg @@ -0,0 +1,85 @@ +# Installer configuration +# +# Perform an automated installation where only critical questions +# are asked interactively +d-i auto-install/enable boolean true +d-i debconf/priority string critical +d-i finish-install/reboot_in_progress note + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +d-i debian-installer/locale string en_US.UTF-8 +d-i keyboard-configuration/xkb-keymap select us +d-i time/zone string Europe/Prague +d-i clock-setup/utc boolean true +d-i clock-setup/ntp boolean true + + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +d-i passwd/make-user boolean false +d-i passwd/root-login boolean true +d-i passwd/root-password password root +d-i passwd/root-password-again password root +d-i user-setup/allow-password-weak boolean true + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +d-i partman-auto/disk string /dev/vda +d-i partman-auto/method string regular +d-i partman-auto/expert_recipe string \ + custom :: \ + 2048 4096 -1 ext4 \ + $primary{ } $bootable{ } \ + method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } \ + . \ + 2048 2048 2048 linux-swap \ + $primary{ } \ + method{ swap } format{ } \ + . +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true + + +# Install bootloader +# +# The bootloader will be installed in the MBR +d-i grub-installer/skip boolean false +d-i grub-installer/bootdev string /dev/vda +d-i grub-installer/only_debian boolean true + + +# Configure networking +# +# The only network interface available to the guest will come up +# at boot using DHCP +d-i netcfg/enable boolean true +d-i netcfg/choose_interface select auto +d-i netcfg/get_hostname string localhost +d-i netcfg/get_domain string localdomain + + +# Software installation +# +# Only install the very base packages: everything else will be +# installed later using Ansible. We need to install openssh-server +# and configure it to permit root login now, though, otherwise we +# won't be able to access the machine for Ansible use later on +tasksel tasksel/first multiselect standard +d-i pkgsel/upgrade select none +d-i pkgsel/include string openssh-server +d-i preseed/late_command string in-target sed -i 's/^#* *PermitRootLogin .*$/PermitRootLogin yes/g' /etc/ssh/sshd_config -- 2.13.6

On Mon, Oct 16, 2017 at 06:02:06PM +0200, Andrea Bolognani wrote:
The 'manage' tool can now be used to install most known guests without requiring user interaction.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 + ansible/host_vars/libvirt-centos-7/install.yml | 3 + ansible/host_vars/libvirt-debian-8/install.yml | 3 + ansible/host_vars/libvirt-debian-9/install.yml | 3 + ansible/host_vars/libvirt-fedora-25/install.yml | 3 + ansible/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-12/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/install.yml | 3 + ansible/kickstart.cfg | 60 +++++++++++++++ ansible/manage | 74 +++++++++++++++++++ ansible/preseed.cfg | 85 ++++++++++++++++++++++ 14 files changed, 259 insertions(+) create mode 100644 ansible/group_vars/all/install.yml create mode 100644 ansible/host_vars/libvirt-centos-6/install.yml create mode 100644 ansible/host_vars/libvirt-centos-7/install.yml create mode 100644 ansible/host_vars/libvirt-debian-8/install.yml create mode 100644 ansible/host_vars/libvirt-debian-9/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/install.yml
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/install.yml create mode 100644 ansible/kickstart.cfg create mode 100644 ansible/preseed.cfg
diff --git a/ansible/group_vars/all/install.yml b/ansible/group_vars/all/install.yml new file mode 100644 index 0000000..714328e --- /dev/null +++ b/ansible/group_vars/all/install.yml @@ -0,0 +1,10 @@ +--- +# Sizes are in GiB +install_virt_type: kvm +install_arch: x86_64 +install_machine: pc +install_vcpus: 2 +install_memory_size: 2 +install_disk_size: 10
Currently we have 15 GiB per guest and in some cases we are able to run out of space. Let's use 15 GiB.
+install_storage_pool: default +install_network: default diff --git a/ansible/host_vars/libvirt-centos-6/install.yml b/ansible/host_vars/libvirt-centos-6/install.yml new file mode 100644 index 0000000..3a9459b --- /dev/null +++ b/ansible/host_vars/libvirt-centos-6/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://mirror.centos.org/centos/6/os/x86_64/ +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-centos-7/install.yml b/ansible/host_vars/libvirt-centos-7/install.yml new file mode 100644 index 0000000..f003b89 --- /dev/null +++ b/ansible/host_vars/libvirt-centos-7/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://mirror.centos.org/centos/7/os/x86_64/ +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-debian-8/install.yml b/ansible/host_vars/libvirt-debian-8/install.yml new file mode 100644 index 0000000..a2c8341 --- /dev/null +++ b/ansible/host_vars/libvirt-debian-8/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://deb.debian.org/debian/dists/jessie/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-debian-9/install.yml b/ansible/host_vars/libvirt-debian-9/install.yml new file mode 100644 index 0000000..5b1da76 --- /dev/null +++ b/ansible/host_vars/libvirt-debian-9/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://deb.debian.org/debian/dists/stretch/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-fedora-25/install.yml b/ansible/host_vars/libvirt-fedora-25/install.yml new file mode 100644 index 0000000..bb4bde3 --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-25/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/releases/25/Server/x86_6... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-fedora-26/install.yml b/ansible/host_vars/libvirt-fedora-26/install.yml new file mode 100644 index 0000000..eff160d --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-26/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/releases/26/Server/x86_6... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-fedora-rawhide/install.yml b/ansible/host_vars/libvirt-fedora-rawhide/install.yml new file mode 100644 index 0000000..2216e81 --- /dev/null +++ b/ansible/host_vars/libvirt-fedora-rawhide/install.yml @@ -0,0 +1,3 @@ +--- +install_url: https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Ever... +install_config: kickstart.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-12/install.yml b/ansible/host_vars/libvirt-ubuntu-12/install.yml new file mode 100644 index 0000000..997304f --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-12/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-14/install.yml b/ansible/host_vars/libvirt-ubuntu-14/install.yml new file mode 100644 index 0000000..d7862a5 --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-14/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/host_vars/libvirt-ubuntu-16/install.yml b/ansible/host_vars/libvirt-ubuntu-16/install.yml new file mode 100644 index 0000000..a7bb2da --- /dev/null +++ b/ansible/host_vars/libvirt-ubuntu-16/install.yml @@ -0,0 +1,3 @@ +--- +install_url: http://archive.ubuntu.com/ubuntu/dists/xenial/main/installer-amd64/ +install_config: preseed.cfg diff --git a/ansible/kickstart.cfg b/ansible/kickstart.cfg new file mode 100644 index 0000000..c28f275 --- /dev/null +++ b/ansible/kickstart.cfg @@ -0,0 +1,60 @@ +# Installer configuration +# +# Perform a text based installation followed by a reboot, and disable +# the first boot assistant +text +install +reboot +firstboot --disable + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +lang en_US.UTF-8 +keyboard us +timezone --utc Europe/Prague + + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +authconfig --enableshadow --passalgo=sha512 +rootpw --plaintext root + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +ignoredisk --only-use=vda +zerombr +clearpart --none +part / --fstype=ext4 --size=2048 --grow +part swap --fstype=swap --size=2048 + + +# Install bootloader +# +# The bootloader will be installed in the MBR +bootloader --location=mbr --timeout=1 + + +# Configure networking +# +# The only network interface available to the guest will come up +# at boot using IPv4-only DHCP +network --bootproto=dhcp --noipv6 --activate --onboot=yes + + +# Software installation +# +# Only install the very base packages: everything else will be +# installed later using Ansible +%packages +@core +%end diff --git a/ansible/manage b/ansible/manage index 46bec6c..d84b8b0 100755 --- a/ansible/manage +++ b/ansible/manage @@ -14,6 +14,33 @@ die() { exit 1 }
+# yaml_var FILE VAR +# +# Read $FILE and output the value of YAML variable $VAR. Only trivial YAML +# values are supported, eg. strings and numbers that don't depend on the +# value of other variables. That's enough for our use case. +yaml_var() { + grep "^$2:\\s*" "$1" 2>/dev/null | tail -1 | sed "s/$2:\\s*//g" +} + +# load_config FILE +# +# Read all known configuration variables from $FILE and set them in the +# environment. Configuration variables that have already been set in +# the environment will not be updated. +load_config() { + INSTALL_URL=${INSTALL_URL:-$(yaml_var "$1" install_url)} + INSTALL_CONFIG=${INSTALL_CONFIG:-$(yaml_var "$1" install_config)} + INSTALL_VIRT_TYPE=${INSTALL_ARCH:-$(yaml_var "$1" install_virt_type)} + INSTALL_ARCH=${INSTALL_ARCH:-$(yaml_var "$1" install_arch)} + INSTALL_MACHINE=${INSTALL_MACHINE:-$(yaml_var "$1" install_machine)} + INSTALL_VCPUS=${INSTALL_VCPUS:-$(yaml_var "$1" install_vcpus)} + INSTALL_MEMORY_SIZE=${INSTALL_MEMORY_SIZE:-$(yaml_var "$1" install_memory_size)} + INSTALL_DISK_SIZE=${INSTALL_DISK_SIZE:-$(yaml_var "$1" install_disk_size)} + INSTALL_STORAGE_POOL=${INSTALL_STORAGE_POOL:-$(yaml_var "$1" install_storage_pool)} + INSTALL_NETWORK=${INSTALL_NETWORK:-$(yaml_var "$1" install_network)} +} + # ---------------------- # User-visible actions # ---------------------- @@ -24,6 +51,7 @@ Usage: $PROGRAM_NAME ACTION [OPTIONS]
Actions: list List known guests + install GUEST Install GUEST prepare GUEST Prepare or update GUEST. Can be run as many times as needed update GUEST Alias for prepare help Display this help" @@ -36,6 +64,51 @@ do_list() { grep -v '^\[' "$INVENTORY" | sort -u }
+do_install() +{ + GUEST="$1" + + test "$GUEST" || { + die "Usage: $PROGRAM_NAME install GUEST" + } + do_list | grep -q "$GUEST" || { + die "$PROGRAM_NAME: $GUEST: Unknown guest" + } + test -f "host_vars/$GUEST/install.yml" || { + die "$PROGRAM_NAME: $GUEST: Missing configuration, guest must be installed manually" + } + + # Load configuration files. Values don't get overwritten after being + # set the first time, so loading the host-specific configuration before + # the group configuration ensures overrides work as expected + load_config "host_vars/$GUEST/install.yml" + load_config "group_vars/all/install.yml" + + # Both memory size and disk size use GiB as unit, but virt-install wants + # disk size in GiB and memory size in *MiB*, so perform conversion here + INSTALL_MEMORY_SIZE=$(expr "$INSTALL_MEMORY_SIZE" \* 1024 2>/dev/null) + + # preseed files must use a well-known name to be picked up by d-i; + # for kickstart files, we can use whatever name we please but we need + # to point anaconda in the right direction through a kernel argument + case "$INSTALL_CONFIG" in + *kickstart*|*ks*) EXTRA_ARGS="ks=file:/${INSTALL_CONFIG##*/}" ;; + esac
I would add "console=ttyS0" into EXTRA_ARGS to get serial console working.
+ + virt-install \ + --name "$GUEST" \ + --location "$INSTALL_URL" \ + --virt-type "$INSTALL_VIRT_TYPE" \ + --arch "$INSTALL_ARCH" \ + --machine "$INSTALL_MACHINE" \ + --vcpus "$INSTALL_VCPUS" \ + --ram "$INSTALL_MEMORY_SIZE" \
Don't use --ram, that is deprecated, --memory should be used instead.
+ --disk "size=$INSTALL_DISK_SIZE,pool=$INSTALL_STORAGE_POOL,bus=virtio" \ + --network "network=$INSTALL_NETWORK,model=virtio" \ + --initrd-inject "$INSTALL_CONFIG" \ + --extra-args "$EXTRA_ARGS"
and we might add: --cpu host-passthrough // we will not migrate the guest --graphics none // we use only ssh to the CI host --serial pty // if something is really wrong with the guest --autostart Pavel

On Tue, Oct 17, 2017 at 05:57:30PM +0200, Pavel Hrdina wrote:
On Mon, Oct 16, 2017 at 06:02:06PM +0200, Andrea Bolognani wrote:
The 'manage' tool can now be used to install most known guests without requiring user interaction.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 + ansible/host_vars/libvirt-centos-7/install.yml | 3 + ansible/host_vars/libvirt-debian-8/install.yml | 3 + ansible/host_vars/libvirt-debian-9/install.yml | 3 + ansible/host_vars/libvirt-fedora-25/install.yml | 3 + ansible/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-12/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/install.yml | 3 + ansible/kickstart.cfg | 60 +++++++++++++++ ansible/manage | 74 +++++++++++++++++++ ansible/preseed.cfg | 85 ++++++++++++++++++++++ 14 files changed, 259 insertions(+) create mode 100644 ansible/group_vars/all/install.yml create mode 100644 ansible/host_vars/libvirt-centos-6/install.yml create mode 100644 ansible/host_vars/libvirt-centos-7/install.yml create mode 100644 ansible/host_vars/libvirt-debian-8/install.yml create mode 100644 ansible/host_vars/libvirt-debian-9/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/install.yml
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/install.yml create mode 100644 ansible/kickstart.cfg create mode 100644 ansible/preseed.cfg
diff --git a/ansible/group_vars/all/install.yml b/ansible/group_vars/all/install.yml new file mode 100644 index 0000000..714328e --- /dev/null +++ b/ansible/group_vars/all/install.yml @@ -0,0 +1,10 @@ +--- +# Sizes are in GiB +install_virt_type: kvm +install_arch: x86_64 +install_machine: pc +install_vcpus: 2 +install_memory_size: 2 +install_disk_size: 10
Currently we have 15 GiB per guest and in some cases we are able to run out of space. Let's use 15 GiB.
We used to run out of space periodically because our RPM build jobs were creating RPMs in $HOME/rpmbuild which jenkins never purged. I reconfigured Jenkins to use the GIT workspace as the RPM build dir, so jenkins always purges RPMs. Since then we've not run out of space again AFAIK. None the less, I agree that 15 GiB is probably the min we need
diff --git a/ansible/kickstart.cfg b/ansible/kickstart.cfg new file mode 100644 index 0000000..c28f275 --- /dev/null +++ b/ansible/kickstart.cfg @@ -0,0 +1,60 @@ +# Installer configuration +# +# Perform a text based installation followed by a reboot, and disable +# the first boot assistant +text +install +reboot +firstboot --disable + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +lang en_US.UTF-8 +keyboard us +timezone --utc Europe/Prague
How about UTC as a neutral option for timezone ;-)
+ + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +authconfig --enableshadow --passalgo=sha512 +rootpw --plaintext root + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +ignoredisk --only-use=vda +zerombr +clearpart --none +part / --fstype=ext4 --size=2048 --grow +part swap --fstype=swap --size=2048
We shouldn't need 2 GiB swap - any builder that uses even a few 100 MB of swap is doomed. I'd give it 300 MB swap max.
+ virt-install \ + --name "$GUEST" \ + --location "$INSTALL_URL" \ + --virt-type "$INSTALL_VIRT_TYPE" \ + --arch "$INSTALL_ARCH" \ + --machine "$INSTALL_MACHINE" \ + --vcpus "$INSTALL_VCPUS" \ + --ram "$INSTALL_MEMORY_SIZE" \
Don't use --ram, that is deprecated, --memory should be used instead.
+ --disk "size=$INSTALL_DISK_SIZE,pool=$INSTALL_STORAGE_POOL,bus=virtio" \ + --network "network=$INSTALL_NETWORK,model=virtio" \ + --initrd-inject "$INSTALL_CONFIG" \ + --extra-args "$EXTRA_ARGS"
and we might add:
--cpu host-passthrough // we will not migrate the guest --graphics none // we use only ssh to the CI host --serial pty // if something is really wrong with the guest --autostart
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, Oct 17, 2017 at 05:04:57PM +0100, Daniel P. Berrange wrote:
On Tue, Oct 17, 2017 at 05:57:30PM +0200, Pavel Hrdina wrote:
On Mon, Oct 16, 2017 at 06:02:06PM +0200, Andrea Bolognani wrote:
The 'manage' tool can now be used to install most known guests without requiring user interaction.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 + ansible/host_vars/libvirt-centos-7/install.yml | 3 + ansible/host_vars/libvirt-debian-8/install.yml | 3 + ansible/host_vars/libvirt-debian-9/install.yml | 3 + ansible/host_vars/libvirt-fedora-25/install.yml | 3 + ansible/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-12/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/install.yml | 3 + ansible/kickstart.cfg | 60 +++++++++++++++ ansible/manage | 74 +++++++++++++++++++ ansible/preseed.cfg | 85 ++++++++++++++++++++++ 14 files changed, 259 insertions(+) create mode 100644 ansible/group_vars/all/install.yml create mode 100644 ansible/host_vars/libvirt-centos-6/install.yml create mode 100644 ansible/host_vars/libvirt-centos-7/install.yml create mode 100644 ansible/host_vars/libvirt-debian-8/install.yml create mode 100644 ansible/host_vars/libvirt-debian-9/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/install.yml
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/install.yml create mode 100644 ansible/kickstart.cfg create mode 100644 ansible/preseed.cfg
diff --git a/ansible/group_vars/all/install.yml b/ansible/group_vars/all/install.yml new file mode 100644 index 0000000..714328e --- /dev/null +++ b/ansible/group_vars/all/install.yml @@ -0,0 +1,10 @@ +--- +# Sizes are in GiB +install_virt_type: kvm +install_arch: x86_64 +install_machine: pc +install_vcpus: 2 +install_memory_size: 2 +install_disk_size: 10
Currently we have 15 GiB per guest and in some cases we are able to run out of space. Let's use 15 GiB.
We used to run out of space periodically because our RPM build jobs were creating RPMs in $HOME/rpmbuild which jenkins never purged. I reconfigured Jenkins to use the GIT workspace as the RPM build dir, so jenkins always purges RPMs. Since then we've not run out of space again AFAIK. None the less, I agree that 15 GiB is probably the min we need
Mainly because some of the guests have only 10 GiB disk.
diff --git a/ansible/kickstart.cfg b/ansible/kickstart.cfg new file mode 100644 index 0000000..c28f275 --- /dev/null +++ b/ansible/kickstart.cfg @@ -0,0 +1,60 @@ +# Installer configuration +# +# Perform a text based installation followed by a reboot, and disable +# the first boot assistant +text +install +reboot +firstboot --disable + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +lang en_US.UTF-8 +keyboard us +timezone --utc Europe/Prague
How about UTC as a neutral option for timezone ;-)
+1
+ + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +authconfig --enableshadow --passalgo=sha512 +rootpw --plaintext root + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +ignoredisk --only-use=vda +zerombr +clearpart --none +part / --fstype=ext4 --size=2048 --grow +part swap --fstype=swap --size=2048
We shouldn't need 2 GiB swap - any builder that uses even a few 100 MB of swap is doomed. I'd give it 300 MB swap max.
We can definitely try that, I'm not sure how much memory the guest needs if there are multiple jobs running. Pavel

On Tue, Oct 17, 2017 at 06:14:35PM +0200, Pavel Hrdina wrote:
On Tue, Oct 17, 2017 at 05:04:57PM +0100, Daniel P. Berrange wrote:
On Tue, Oct 17, 2017 at 05:57:30PM +0200, Pavel Hrdina wrote:
On Mon, Oct 16, 2017 at 06:02:06PM +0200, Andrea Bolognani wrote:
The 'manage' tool can now be used to install most known guests without requiring user interaction.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/group_vars/all/install.yml | 10 +++ ansible/host_vars/libvirt-centos-6/install.yml | 3 + ansible/host_vars/libvirt-centos-7/install.yml | 3 + ansible/host_vars/libvirt-debian-8/install.yml | 3 + ansible/host_vars/libvirt-debian-9/install.yml | 3 + ansible/host_vars/libvirt-fedora-25/install.yml | 3 + ansible/host_vars/libvirt-fedora-26/install.yml | 3 + .../host_vars/libvirt-fedora-rawhide/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-12/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-14/install.yml | 3 + ansible/host_vars/libvirt-ubuntu-16/install.yml | 3 + ansible/kickstart.cfg | 60 +++++++++++++++ ansible/manage | 74 +++++++++++++++++++ ansible/preseed.cfg | 85 ++++++++++++++++++++++ 14 files changed, 259 insertions(+) create mode 100644 ansible/group_vars/all/install.yml create mode 100644 ansible/host_vars/libvirt-centos-6/install.yml create mode 100644 ansible/host_vars/libvirt-centos-7/install.yml create mode 100644 ansible/host_vars/libvirt-debian-8/install.yml create mode 100644 ansible/host_vars/libvirt-debian-9/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-25/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-26/install.yml create mode 100644 ansible/host_vars/libvirt-fedora-rawhide/install.yml
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
create mode 100644 ansible/host_vars/libvirt-ubuntu-12/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-14/install.yml create mode 100644 ansible/host_vars/libvirt-ubuntu-16/install.yml create mode 100644 ansible/kickstart.cfg create mode 100644 ansible/preseed.cfg
diff --git a/ansible/group_vars/all/install.yml b/ansible/group_vars/all/install.yml new file mode 100644 index 0000000..714328e --- /dev/null +++ b/ansible/group_vars/all/install.yml @@ -0,0 +1,10 @@ +--- +# Sizes are in GiB +install_virt_type: kvm +install_arch: x86_64 +install_machine: pc +install_vcpus: 2 +install_memory_size: 2 +install_disk_size: 10
Currently we have 15 GiB per guest and in some cases we are able to run out of space. Let's use 15 GiB.
We used to run out of space periodically because our RPM build jobs were creating RPMs in $HOME/rpmbuild which jenkins never purged. I reconfigured Jenkins to use the GIT workspace as the RPM build dir, so jenkins always purges RPMs. Since then we've not run out of space again AFAIK. None the less, I agree that 15 GiB is probably the min we need
Mainly because some of the guests have only 10 GiB disk.
diff --git a/ansible/kickstart.cfg b/ansible/kickstart.cfg new file mode 100644 index 0000000..c28f275 --- /dev/null +++ b/ansible/kickstart.cfg @@ -0,0 +1,60 @@ +# Installer configuration +# +# Perform a text based installation followed by a reboot, and disable +# the first boot assistant +text +install +reboot +firstboot --disable + + +# Environment configuration +# +# Locale, keyboard and timezone. All these will be configured again +# later with Ansible, but they're required information so we must +# provide them +lang en_US.UTF-8 +keyboard us +timezone --utc Europe/Prague
How about UTC as a neutral option for timezone ;-)
+1
+ + +# User creation +# +# We don't create any user except for root. We can use a very insecure +# root password because the guest will not be exposed to the Internet: +# it will only be accessible from the host itself +authconfig --enableshadow --passalgo=sha512 +rootpw --plaintext root + + +# Partition disk +# +# Erase everything and set up a 2 GiB swap partition, then assign all +# remaining space to the root partition +ignoredisk --only-use=vda +zerombr +clearpart --none +part / --fstype=ext4 --size=2048 --grow +part swap --fstype=swap --size=2048
We shouldn't need 2 GiB swap - any builder that uses even a few 100 MB of swap is doomed. I'd give it 300 MB swap max.
We can definitely try that, I'm not sure how much memory the guest needs if there are multiple jobs running.
If we have too much load from jobs for the amount of RAM allocated, such that some are pushed to swap, the build time is just going to balloon. We would get faster builds by reducing the number of parallel jobs so that we don't exceed RAM, even if this ends up basically serializing most of it. Or give guests more RAM, and let the host OS do swapping of idle KVM instances instead. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, 2017-10-17 at 17:57 +0200, Pavel Hrdina wrote:
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
While a sane CI setup is definitely the primary reason why this work is happening, a secondary goal is making it possible for (potential) developers to ensure portability and debug build issues on platforms that they don't already have easy access to. The overlap between the two goals is basically 99% anyway. Moreover, if some build job fails on Travis, it would be nice to quickly reproduce the failure locally[1] instead of doing multiple round-trips to Travis. So I vote for keeping the Ubuntu bits, especially considering that the overhead is literally 9 lines :)
+install_disk_size: 10
Currently we have 15 GiB per guest and in some cases we are able to run out of space. Let's use 15 GiB.
Sure.
+ case "$INSTALL_CONFIG" in + *kickstart*|*ks*) EXTRA_ARGS="ks=file:/${INSTALL_CONFIG##*/}" ;; + esac
I would add "console=ttyS0" into EXTRA_ARGS to get serial console working.
I prefer serial console to graphical console too, but for some reason I thought that would not be appropriate for the CI setup... Guess I should just have asked ;)
+ --ram "$INSTALL_MEMORY_SIZE" \
Don't use --ram, that is deprecated, --memory should be used instead.
TIL! Consider it done.
+ --disk "size=$INSTALL_DISK_SIZE,pool=$INSTALL_STORAGE_POOL,bus=virtio" \ + --network "network=$INSTALL_NETWORK,model=virtio" \ + --initrd-inject "$INSTALL_CONFIG" \ + --extra-args "$EXTRA_ARGS"
and we might add:
--cpu host-passthrough // we will not migrate the guest --graphics none // we use only ssh to the CI host --serial pty // if something is really wrong with the guest --autostart
These all look sensible, I'll add them. [1] I almost had a success story I could use to prove my point today: Martin ran into a Travis build failure while testing out some new stuff, and thanks to the Ubuntu configs we were able to bring up a fully-configured Ubuntu 14.04 guest in around 10 minutes. Unfortunately the failure ended up not reproducing in the guest, which is quite annoying and something that requires more investigation, but the point about the usefulness of having this ability still stands IMHO. -- Andrea Bolognani / Red Hat / Virtualization

On Tue, Oct 17, 2017 at 06:24:47PM +0200, Andrea Bolognani wrote:
On Tue, 2017-10-17 at 17:57 +0200, Pavel Hrdina wrote:
I wouldn't include Ubuntu related things. Yes, we use travis where they have Ubuntu nodes, but this is jenkins-ci repository where we don't use Ubuntu at all.
While a sane CI setup is definitely the primary reason why this work is happening, a secondary goal is making it possible for (potential) developers to ensure portability and debug build issues on platforms that they don't already have easy access to. The overlap between the two goals is basically 99% anyway.
Moreover, if some build job fails on Travis, it would be nice to quickly reproduce the failure locally[1] instead of doing multiple round-trips to Travis. So I vote for keeping the Ubuntu bits, especially considering that the overhead is literally 9 lines :)
Yeah, I think it is reasonable to have Ubuntu support. Travis is somewhat performance limited, so if we ever get more CI hardware of our own I would expect us to move Ubuntu jobs off Travis. The only key unique thing about Travis is ability to build on OS-X - we can't easily replicate that ourselves due to OS-X restrictive licensing. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Tue, 2017-10-17 at 17:32 +0100, Daniel P. Berrange wrote:
Yeah, I think it is reasonable to have Ubuntu support. Travis is somewhat performance limited
Not to mention the embarassingly outdated OS offering. But hey, it's worth every penny we spend on it! :) -- Andrea Bolognani / Red Hat / Virtualization

Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- ansible/README.markdown | 74 +++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 27 deletions(-) diff --git a/ansible/README.markdown b/ansible/README.markdown index 4d464e1..b867aee 100644 --- a/ansible/README.markdown +++ b/ansible/README.markdown @@ -1,38 +1,40 @@ -Ansible playbooks for libvirt CI -================================ +libvirt CI - guest management tools +=================================== -These can be used to turn a freshly installed machine into a worker for -the Jenkins-based libvirt CI. +The tools contained in this directory simplify and automate the management +of the guests used by the Jenkins-based libvirt CI environment. -There are two main playbooks: +There are two steps to bringing up a guest: -* `bootstrap.yml`, used to perform the bootstrapping phase, that is, getting - guests to the point where Ansible can manage them fully and prompting the - user for a password is no longer required; +* `./manage install $guest` will perform an unattended installation + of `$guest`. Not all guests can be installed this way: see the "FreeBSD" + section below; -* `site.yml`, used for the remaining configuration steps. +* `./manage prepare $guest` will go through all the post-installation + configuration steps required to make the newly-created guest usable as + part of the Jenkins setup. -Although you can use the playbooks directly, it's much more convenient to -call either `make bootstrap` or `make site` instead. +Once those steps have been performed, maintainance will involve running: -Each guest only needs to be bootstrapped once; that said, both playbooks are -idempotent so there's no harm in applying them over and over again. +* `./manage update $guest` +periodically to ensure the guest configuration is sane and all installed +packages are updated. -Requirements ------------- -SSH must be running in the guest, and root login must be permitted. +Security warning +---------------- +The guests created using these tools are configured to allow logging +in remotely as root with a well-known password: because of that, they +are *completely insecure* and must *never* be exposed on any network, +nor should they be used to perform any privacy-sensitive activity. -CI use ------- -After you have reinstalled a Jenkins worker, run `make bootstrap` followed -by `make site` and a reboot to get it ready for CI use. No further action -should be necessary. +Adding new guests +----------------- -Adding new workers will require tweaking the inventory and host variables, +Adding new guests will require tweaking the inventory and host variables, but it should be very easy to eg. use the Fedora 26 configuration to come up with a working Fedora 27 configuration. @@ -40,11 +42,11 @@ up with a working Fedora 27 configuration. Development use --------------- -If you are a developer trying to reproduce a bug on some OS you don't have -easy access to, you can use these playbooks to create a suitable test +If you are a developer trying to reproduce a bug on some OS you don't +have easy access to, you can use these tools to create a suitable test environment. -Since the playbooks are intended mainly for CI use, you'll have to tweak them +Since the tools are intended mainly for CI use, you'll have to tweak them a bit first, including: * trimming down the `inventory` file to just the guest you're interested in; @@ -56,5 +58,23 @@ a bit first, including: * deleting `host_vars/$guest/vault.yml` altogether. -After performing these tweaks, you should be able to just run `make bootstrap` -followed by `make site` as usual. +After performing these tweaks, you should be able to use the same steps +outlined above. + + +FreeBSD +------- + +Installation of FreeBSD guests must be performed manually; alternatively, +the official qcow2 images can be used to quickly bring up such guests. + +Some manual tweaking will be needed, in particular: + +* `/etc/ssh/sshd_config` must contain the `PermitRootLogin yes` directive; + +* `/etc/rc.conf` must contain the `sshd_enable="YES"` setting; + +* the root password must be manually set to "root" (without quotes). + +Once these steps have been performed, FreeBSD guests can be managed just +like all other guests. -- 2.13.6

There's more than just Ansible playbooks in that directory now, so a more generic name is more appropriate. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- {ansible => guests}/.gitignore | 0 {ansible => guests}/README.markdown | 0 {ansible => guests}/ansible.cfg | 0 {ansible => guests}/group_vars/all/install.yml | 0 {ansible => guests}/group_vars/all/main.yml | 0 {ansible => guests}/host_vars/libvirt-centos-6/install.yml | 0 {ansible => guests}/host_vars/libvirt-centos-6/main.yml | 0 {ansible => guests}/host_vars/libvirt-centos-6/vault.yml | 0 {ansible => guests}/host_vars/libvirt-centos-7/install.yml | 0 {ansible => guests}/host_vars/libvirt-centos-7/main.yml | 0 {ansible => guests}/host_vars/libvirt-centos-7/vault.yml | 0 {ansible => guests}/host_vars/libvirt-debian-8/install.yml | 0 {ansible => guests}/host_vars/libvirt-debian-8/main.yml | 0 {ansible => guests}/host_vars/libvirt-debian-8/vault.yml | 0 {ansible => guests}/host_vars/libvirt-debian-9/install.yml | 0 {ansible => guests}/host_vars/libvirt-debian-9/main.yml | 0 {ansible => guests}/host_vars/libvirt-debian-9/vault.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-25/install.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-25/main.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-25/vault.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-26/install.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-26/main.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-26/vault.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-rawhide/install.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-rawhide/main.yml | 0 {ansible => guests}/host_vars/libvirt-fedora-rawhide/vault.yml | 0 {ansible => guests}/host_vars/libvirt-freebsd-10/main.yml | 0 {ansible => guests}/host_vars/libvirt-freebsd-10/vault.yml | 0 {ansible => guests}/host_vars/libvirt-freebsd-11/main.yml | 0 {ansible => guests}/host_vars/libvirt-freebsd-11/vault.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-12/install.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-12/main.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-12/vault.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-14/install.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-14/main.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-14/vault.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-16/install.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-16/main.yml | 0 {ansible => guests}/host_vars/libvirt-ubuntu-16/vault.yml | 0 {ansible => guests}/inventory | 0 {ansible => guests}/kickstart.cfg | 0 {ansible => guests}/manage | 0 {ansible => guests}/preseed.cfg | 0 {ansible => guests}/site.yml | 0 {ansible => guests}/tasks/base.yml | 0 {ansible => guests}/tasks/bootstrap.yml | 0 {ansible => guests}/tasks/compat.yml | 0 {ansible => guests}/tasks/jenkins.yml | 0 {ansible => guests}/tasks/packages.yml | 0 {ansible => guests}/templates/jenkins.service.j2 | 0 {ansible => guests}/vars/mappings.yml | 0 {ansible => guests}/vars/projects/base.yml | 0 {ansible => guests}/vars/projects/jenkins.yml | 0 {ansible => guests}/vars/projects/libosinfo.yml | 0 {ansible => guests}/vars/projects/libvirt-cim.yml | 0 {ansible => guests}/vars/projects/libvirt-glib.yml | 0 {ansible => guests}/vars/projects/libvirt-go-xml.yml | 0 {ansible => guests}/vars/projects/libvirt-go.yml | 0 {ansible => guests}/vars/projects/libvirt-perl.yml | 0 {ansible => guests}/vars/projects/libvirt-python.yml | 0 {ansible => guests}/vars/projects/libvirt-sandbox.yml | 0 {ansible => guests}/vars/projects/libvirt-tck.yml | 0 {ansible => guests}/vars/projects/libvirt.yml | 0 {ansible => guests}/vars/projects/osinfo-db-tools.yml | 0 {ansible => guests}/vars/projects/osinfo-db.yml | 0 {ansible => guests}/vars/projects/virt-manager.yml | 0 {ansible => guests}/vars/projects/virt-viewer.yml | 0 67 files changed, 0 insertions(+), 0 deletions(-) rename {ansible => guests}/.gitignore (100%) rename {ansible => guests}/README.markdown (100%) rename {ansible => guests}/ansible.cfg (100%) rename {ansible => guests}/group_vars/all/install.yml (100%) rename {ansible => guests}/group_vars/all/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-6/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-6/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-6/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-7/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-7/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-centos-7/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-8/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-8/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-8/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-9/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-9/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-debian-9/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-25/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-25/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-25/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-26/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-26/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-26/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-fedora-rawhide/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-10/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-10/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-11/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-freebsd-11/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-12/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-12/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-12/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-14/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-14/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-14/vault.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-16/install.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-16/main.yml (100%) rename {ansible => guests}/host_vars/libvirt-ubuntu-16/vault.yml (100%) rename {ansible => guests}/inventory (100%) rename {ansible => guests}/kickstart.cfg (100%) rename {ansible => guests}/manage (100%) rename {ansible => guests}/preseed.cfg (100%) rename {ansible => guests}/site.yml (100%) rename {ansible => guests}/tasks/base.yml (100%) rename {ansible => guests}/tasks/bootstrap.yml (100%) rename {ansible => guests}/tasks/compat.yml (100%) rename {ansible => guests}/tasks/jenkins.yml (100%) rename {ansible => guests}/tasks/packages.yml (100%) rename {ansible => guests}/templates/jenkins.service.j2 (100%) rename {ansible => guests}/vars/mappings.yml (100%) rename {ansible => guests}/vars/projects/base.yml (100%) rename {ansible => guests}/vars/projects/jenkins.yml (100%) rename {ansible => guests}/vars/projects/libosinfo.yml (100%) rename {ansible => guests}/vars/projects/libvirt-cim.yml (100%) rename {ansible => guests}/vars/projects/libvirt-glib.yml (100%) rename {ansible => guests}/vars/projects/libvirt-go-xml.yml (100%) rename {ansible => guests}/vars/projects/libvirt-go.yml (100%) rename {ansible => guests}/vars/projects/libvirt-perl.yml (100%) rename {ansible => guests}/vars/projects/libvirt-python.yml (100%) rename {ansible => guests}/vars/projects/libvirt-sandbox.yml (100%) rename {ansible => guests}/vars/projects/libvirt-tck.yml (100%) rename {ansible => guests}/vars/projects/libvirt.yml (100%) rename {ansible => guests}/vars/projects/osinfo-db-tools.yml (100%) rename {ansible => guests}/vars/projects/osinfo-db.yml (100%) rename {ansible => guests}/vars/projects/virt-manager.yml (100%) rename {ansible => guests}/vars/projects/virt-viewer.yml (100%) diff --git a/ansible/.gitignore b/guests/.gitignore similarity index 100% rename from ansible/.gitignore rename to guests/.gitignore diff --git a/ansible/README.markdown b/guests/README.markdown similarity index 100% rename from ansible/README.markdown rename to guests/README.markdown diff --git a/ansible/ansible.cfg b/guests/ansible.cfg similarity index 100% rename from ansible/ansible.cfg rename to guests/ansible.cfg diff --git a/ansible/group_vars/all/install.yml b/guests/group_vars/all/install.yml similarity index 100% rename from ansible/group_vars/all/install.yml rename to guests/group_vars/all/install.yml diff --git a/ansible/group_vars/all/main.yml b/guests/group_vars/all/main.yml similarity index 100% rename from ansible/group_vars/all/main.yml rename to guests/group_vars/all/main.yml diff --git a/ansible/host_vars/libvirt-centos-6/install.yml b/guests/host_vars/libvirt-centos-6/install.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-6/install.yml rename to guests/host_vars/libvirt-centos-6/install.yml diff --git a/ansible/host_vars/libvirt-centos-6/main.yml b/guests/host_vars/libvirt-centos-6/main.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-6/main.yml rename to guests/host_vars/libvirt-centos-6/main.yml diff --git a/ansible/host_vars/libvirt-centos-6/vault.yml b/guests/host_vars/libvirt-centos-6/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-6/vault.yml rename to guests/host_vars/libvirt-centos-6/vault.yml diff --git a/ansible/host_vars/libvirt-centos-7/install.yml b/guests/host_vars/libvirt-centos-7/install.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-7/install.yml rename to guests/host_vars/libvirt-centos-7/install.yml diff --git a/ansible/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-7/main.yml rename to guests/host_vars/libvirt-centos-7/main.yml diff --git a/ansible/host_vars/libvirt-centos-7/vault.yml b/guests/host_vars/libvirt-centos-7/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-centos-7/vault.yml rename to guests/host_vars/libvirt-centos-7/vault.yml diff --git a/ansible/host_vars/libvirt-debian-8/install.yml b/guests/host_vars/libvirt-debian-8/install.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-8/install.yml rename to guests/host_vars/libvirt-debian-8/install.yml diff --git a/ansible/host_vars/libvirt-debian-8/main.yml b/guests/host_vars/libvirt-debian-8/main.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-8/main.yml rename to guests/host_vars/libvirt-debian-8/main.yml diff --git a/ansible/host_vars/libvirt-debian-8/vault.yml b/guests/host_vars/libvirt-debian-8/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-8/vault.yml rename to guests/host_vars/libvirt-debian-8/vault.yml diff --git a/ansible/host_vars/libvirt-debian-9/install.yml b/guests/host_vars/libvirt-debian-9/install.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-9/install.yml rename to guests/host_vars/libvirt-debian-9/install.yml diff --git a/ansible/host_vars/libvirt-debian-9/main.yml b/guests/host_vars/libvirt-debian-9/main.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-9/main.yml rename to guests/host_vars/libvirt-debian-9/main.yml diff --git a/ansible/host_vars/libvirt-debian-9/vault.yml b/guests/host_vars/libvirt-debian-9/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-debian-9/vault.yml rename to guests/host_vars/libvirt-debian-9/vault.yml diff --git a/ansible/host_vars/libvirt-fedora-25/install.yml b/guests/host_vars/libvirt-fedora-25/install.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-25/install.yml rename to guests/host_vars/libvirt-fedora-25/install.yml diff --git a/ansible/host_vars/libvirt-fedora-25/main.yml b/guests/host_vars/libvirt-fedora-25/main.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-25/main.yml rename to guests/host_vars/libvirt-fedora-25/main.yml diff --git a/ansible/host_vars/libvirt-fedora-25/vault.yml b/guests/host_vars/libvirt-fedora-25/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-25/vault.yml rename to guests/host_vars/libvirt-fedora-25/vault.yml diff --git a/ansible/host_vars/libvirt-fedora-26/install.yml b/guests/host_vars/libvirt-fedora-26/install.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-26/install.yml rename to guests/host_vars/libvirt-fedora-26/install.yml diff --git a/ansible/host_vars/libvirt-fedora-26/main.yml b/guests/host_vars/libvirt-fedora-26/main.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-26/main.yml rename to guests/host_vars/libvirt-fedora-26/main.yml diff --git a/ansible/host_vars/libvirt-fedora-26/vault.yml b/guests/host_vars/libvirt-fedora-26/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-26/vault.yml rename to guests/host_vars/libvirt-fedora-26/vault.yml diff --git a/ansible/host_vars/libvirt-fedora-rawhide/install.yml b/guests/host_vars/libvirt-fedora-rawhide/install.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-rawhide/install.yml rename to guests/host_vars/libvirt-fedora-rawhide/install.yml diff --git a/ansible/host_vars/libvirt-fedora-rawhide/main.yml b/guests/host_vars/libvirt-fedora-rawhide/main.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-rawhide/main.yml rename to guests/host_vars/libvirt-fedora-rawhide/main.yml diff --git a/ansible/host_vars/libvirt-fedora-rawhide/vault.yml b/guests/host_vars/libvirt-fedora-rawhide/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-fedora-rawhide/vault.yml rename to guests/host_vars/libvirt-fedora-rawhide/vault.yml diff --git a/ansible/host_vars/libvirt-freebsd-10/main.yml b/guests/host_vars/libvirt-freebsd-10/main.yml similarity index 100% rename from ansible/host_vars/libvirt-freebsd-10/main.yml rename to guests/host_vars/libvirt-freebsd-10/main.yml diff --git a/ansible/host_vars/libvirt-freebsd-10/vault.yml b/guests/host_vars/libvirt-freebsd-10/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-freebsd-10/vault.yml rename to guests/host_vars/libvirt-freebsd-10/vault.yml diff --git a/ansible/host_vars/libvirt-freebsd-11/main.yml b/guests/host_vars/libvirt-freebsd-11/main.yml similarity index 100% rename from ansible/host_vars/libvirt-freebsd-11/main.yml rename to guests/host_vars/libvirt-freebsd-11/main.yml diff --git a/ansible/host_vars/libvirt-freebsd-11/vault.yml b/guests/host_vars/libvirt-freebsd-11/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-freebsd-11/vault.yml rename to guests/host_vars/libvirt-freebsd-11/vault.yml diff --git a/ansible/host_vars/libvirt-ubuntu-12/install.yml b/guests/host_vars/libvirt-ubuntu-12/install.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-12/install.yml rename to guests/host_vars/libvirt-ubuntu-12/install.yml diff --git a/ansible/host_vars/libvirt-ubuntu-12/main.yml b/guests/host_vars/libvirt-ubuntu-12/main.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-12/main.yml rename to guests/host_vars/libvirt-ubuntu-12/main.yml diff --git a/ansible/host_vars/libvirt-ubuntu-12/vault.yml b/guests/host_vars/libvirt-ubuntu-12/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-12/vault.yml rename to guests/host_vars/libvirt-ubuntu-12/vault.yml diff --git a/ansible/host_vars/libvirt-ubuntu-14/install.yml b/guests/host_vars/libvirt-ubuntu-14/install.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-14/install.yml rename to guests/host_vars/libvirt-ubuntu-14/install.yml diff --git a/ansible/host_vars/libvirt-ubuntu-14/main.yml b/guests/host_vars/libvirt-ubuntu-14/main.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-14/main.yml rename to guests/host_vars/libvirt-ubuntu-14/main.yml diff --git a/ansible/host_vars/libvirt-ubuntu-14/vault.yml b/guests/host_vars/libvirt-ubuntu-14/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-14/vault.yml rename to guests/host_vars/libvirt-ubuntu-14/vault.yml diff --git a/ansible/host_vars/libvirt-ubuntu-16/install.yml b/guests/host_vars/libvirt-ubuntu-16/install.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-16/install.yml rename to guests/host_vars/libvirt-ubuntu-16/install.yml diff --git a/ansible/host_vars/libvirt-ubuntu-16/main.yml b/guests/host_vars/libvirt-ubuntu-16/main.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-16/main.yml rename to guests/host_vars/libvirt-ubuntu-16/main.yml diff --git a/ansible/host_vars/libvirt-ubuntu-16/vault.yml b/guests/host_vars/libvirt-ubuntu-16/vault.yml similarity index 100% rename from ansible/host_vars/libvirt-ubuntu-16/vault.yml rename to guests/host_vars/libvirt-ubuntu-16/vault.yml diff --git a/ansible/inventory b/guests/inventory similarity index 100% rename from ansible/inventory rename to guests/inventory diff --git a/ansible/kickstart.cfg b/guests/kickstart.cfg similarity index 100% rename from ansible/kickstart.cfg rename to guests/kickstart.cfg diff --git a/ansible/manage b/guests/manage similarity index 100% rename from ansible/manage rename to guests/manage diff --git a/ansible/preseed.cfg b/guests/preseed.cfg similarity index 100% rename from ansible/preseed.cfg rename to guests/preseed.cfg diff --git a/ansible/site.yml b/guests/site.yml similarity index 100% rename from ansible/site.yml rename to guests/site.yml diff --git a/ansible/tasks/base.yml b/guests/tasks/base.yml similarity index 100% rename from ansible/tasks/base.yml rename to guests/tasks/base.yml diff --git a/ansible/tasks/bootstrap.yml b/guests/tasks/bootstrap.yml similarity index 100% rename from ansible/tasks/bootstrap.yml rename to guests/tasks/bootstrap.yml diff --git a/ansible/tasks/compat.yml b/guests/tasks/compat.yml similarity index 100% rename from ansible/tasks/compat.yml rename to guests/tasks/compat.yml diff --git a/ansible/tasks/jenkins.yml b/guests/tasks/jenkins.yml similarity index 100% rename from ansible/tasks/jenkins.yml rename to guests/tasks/jenkins.yml diff --git a/ansible/tasks/packages.yml b/guests/tasks/packages.yml similarity index 100% rename from ansible/tasks/packages.yml rename to guests/tasks/packages.yml diff --git a/ansible/templates/jenkins.service.j2 b/guests/templates/jenkins.service.j2 similarity index 100% rename from ansible/templates/jenkins.service.j2 rename to guests/templates/jenkins.service.j2 diff --git a/ansible/vars/mappings.yml b/guests/vars/mappings.yml similarity index 100% rename from ansible/vars/mappings.yml rename to guests/vars/mappings.yml diff --git a/ansible/vars/projects/base.yml b/guests/vars/projects/base.yml similarity index 100% rename from ansible/vars/projects/base.yml rename to guests/vars/projects/base.yml diff --git a/ansible/vars/projects/jenkins.yml b/guests/vars/projects/jenkins.yml similarity index 100% rename from ansible/vars/projects/jenkins.yml rename to guests/vars/projects/jenkins.yml diff --git a/ansible/vars/projects/libosinfo.yml b/guests/vars/projects/libosinfo.yml similarity index 100% rename from ansible/vars/projects/libosinfo.yml rename to guests/vars/projects/libosinfo.yml diff --git a/ansible/vars/projects/libvirt-cim.yml b/guests/vars/projects/libvirt-cim.yml similarity index 100% rename from ansible/vars/projects/libvirt-cim.yml rename to guests/vars/projects/libvirt-cim.yml diff --git a/ansible/vars/projects/libvirt-glib.yml b/guests/vars/projects/libvirt-glib.yml similarity index 100% rename from ansible/vars/projects/libvirt-glib.yml rename to guests/vars/projects/libvirt-glib.yml diff --git a/ansible/vars/projects/libvirt-go-xml.yml b/guests/vars/projects/libvirt-go-xml.yml similarity index 100% rename from ansible/vars/projects/libvirt-go-xml.yml rename to guests/vars/projects/libvirt-go-xml.yml diff --git a/ansible/vars/projects/libvirt-go.yml b/guests/vars/projects/libvirt-go.yml similarity index 100% rename from ansible/vars/projects/libvirt-go.yml rename to guests/vars/projects/libvirt-go.yml diff --git a/ansible/vars/projects/libvirt-perl.yml b/guests/vars/projects/libvirt-perl.yml similarity index 100% rename from ansible/vars/projects/libvirt-perl.yml rename to guests/vars/projects/libvirt-perl.yml diff --git a/ansible/vars/projects/libvirt-python.yml b/guests/vars/projects/libvirt-python.yml similarity index 100% rename from ansible/vars/projects/libvirt-python.yml rename to guests/vars/projects/libvirt-python.yml diff --git a/ansible/vars/projects/libvirt-sandbox.yml b/guests/vars/projects/libvirt-sandbox.yml similarity index 100% rename from ansible/vars/projects/libvirt-sandbox.yml rename to guests/vars/projects/libvirt-sandbox.yml diff --git a/ansible/vars/projects/libvirt-tck.yml b/guests/vars/projects/libvirt-tck.yml similarity index 100% rename from ansible/vars/projects/libvirt-tck.yml rename to guests/vars/projects/libvirt-tck.yml diff --git a/ansible/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml similarity index 100% rename from ansible/vars/projects/libvirt.yml rename to guests/vars/projects/libvirt.yml diff --git a/ansible/vars/projects/osinfo-db-tools.yml b/guests/vars/projects/osinfo-db-tools.yml similarity index 100% rename from ansible/vars/projects/osinfo-db-tools.yml rename to guests/vars/projects/osinfo-db-tools.yml diff --git a/ansible/vars/projects/osinfo-db.yml b/guests/vars/projects/osinfo-db.yml similarity index 100% rename from ansible/vars/projects/osinfo-db.yml rename to guests/vars/projects/osinfo-db.yml diff --git a/ansible/vars/projects/virt-manager.yml b/guests/vars/projects/virt-manager.yml similarity index 100% rename from ansible/vars/projects/virt-manager.yml rename to guests/vars/projects/virt-manager.yml diff --git a/ansible/vars/projects/virt-viewer.yml b/guests/vars/projects/virt-viewer.yml similarity index 100% rename from ansible/vars/projects/virt-viewer.yml rename to guests/vars/projects/virt-viewer.yml -- 2.13.6

When running the manage tool as part of scheduled maintainance, eg. in a cron job, it would be annoying to have to loop over the output of 'manage list' and call 'manage update' on each of the guests; it would also mean not taking advantage of Ansible's parallel execution capabilities, which can speed up things considerably. Solve the problem by allowing 'all' to be used as a guest name. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- This will not be its own separate commit when pushing, but it will be squashed into commit 2/5, with a small adjustment required in commit 3/5 to deal with merge conflicts in the help text. guests/manage | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guests/manage b/guests/manage index d84b8b0..5927d62 100755 --- a/guests/manage +++ b/guests/manage @@ -50,11 +50,11 @@ do_help() { Usage: $PROGRAM_NAME ACTION [OPTIONS] Actions: - list List known guests - install GUEST Install GUEST - prepare GUEST Prepare or update GUEST. Can be run as many times as needed - update GUEST Alias for prepare - help Display this help" + list List known guests + install GUEST Install GUEST + prepare GUEST|all Prepare or update GUEST. Can be run multiple times + update GUEST|all Alias for prepare + help Display this help" } do_list() { @@ -113,9 +113,9 @@ do_prepare() { GUEST="$1" test "$GUEST" || { - die "Usage: $PROGRAM_NAME prepare GUEST" + die "Usage: $PROGRAM_NAME prepare GUEST|all" } - do_list | grep -q "$GUEST" || { + do_list | grep -q "$GUEST" || test "$GUEST" = all || { die "$PROGRAM_NAME: $GUEST: Unknown guest" } -- 2.13.6
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrange
-
Pavel Hrdina