From nobody Tue May 10 15:46:51 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4199A1AE7389 for ; Tue, 10 May 2022 15:47:10 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KyMqK3cr2z3vQH for ; Tue, 10 May 2022 15:47:09 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-e5e433d66dso18744233fac.5 for ; Tue, 10 May 2022 08:47:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zCFqovSUZFBC71QH7d+A2ClTlLjf4E03epqNnUhfmq0=; b=pvB47w5GUs+KsID7pHJ0g5DCDmvUX7elMYSr8Y/KiyS6c7zi3u8VT16A+NjJ9TQJoO ALriEZXEGLmhvi4DKJbSYfwEkx/Dl8V6/NEx7Lmg3nP9JEOWOGGQieARj8rULaKv/rPT ODAHLNrIUnulqM28Xo13gjtxCPw97J5bk6lydlz/ePm+TjwGWOCIsZKSN0rjfDXaQt1c J9WIxBq2pm8E/xy4gvYIG8/t/eoGcT3Gfm9s1eiTmaRguLHDiUoWd4niJMrbKuTxA11h 8F1gZiVAc/mMObWCLUfHAlAXneRZsscF+1BMR6d/TpOZeIJ+h+zzQw9t7os5+B50WSNa KTjA== X-Gm-Message-State: AOAM533DjkBOuRDmrH9RWPBT0tXhltxKVWcVFJ9B/pdwX1iWATFWiAk0 oUpCwjgmyPcEM30CukrOEUg+s88QEHbbcl7V9r6S5f7e X-Google-Smtp-Source: ABdhPJzYusn169BLS+uyl06jaVzvRguYkeZkTYEfQTrAzoJ/q7jaZKiEGToaLWOC0OK7JKv5QnUgwZP0GWvVPrjLR6g= X-Received: by 2002:a05:6870:a2d2:b0:d7:60ca:5065 with SMTP id w18-20020a056870a2d200b000d760ca5065mr426832oak.72.1652197623200; Tue, 10 May 2022 08:47:03 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Tue, 10 May 2022 09:46:51 -0600 Message-ID: Subject: Re: Upgrade automation To: Cristian Cardoso Cc: FreeBSD CURRENT Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4KyMqK3cr2z3vQH X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.160.52 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-0.95 / 15.00]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.52:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.91)[-0.911]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.964]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.52:from]; MLMMJ_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Tue, May 10, 2022 at 9:08 AM Cristian Cardoso wrote: > > Hi > > I have some FreeBSD servers in my machine park and I would like to perform the version upgrade in an automated way with ansible. > > In my example, I want to perform the upgrade from version 12.3 to 13, it is possible to run the upgrade with the command below: > > freebsd-update --not-running-from-cron upgrade -r 12.2-RELEASE > > I ask this, because I don't know if it's the most correct way to execute this. > > Grateful for any assistance. Yes, that's perfect. But there's another step too. You'll have to do: freebsd-update install And _this_ step isn't easy to perfectly automate, because etcupdate may ask for your input when it merges config files. If you know exactly which etc files you've modified, you can add them to IgnorePaths. That way etcupdate won't run interactively, it will simply throw away changes from upstream. Whenever I need to upgrade multiple machines at once, I start tmux, split it into multiple panes, ssh to each server from one pane, then do ":synchronize-panes on" so my input will be directed to multiple panes simultaneously. Usually, that works for 90% of the upgrade. But invariably there are a few files that aren't synchronized between the servers, and I have to desynchronize my panes to deal with that. -Alan