--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - name: Add OpenTofu repository ansible.builtin.yum_repository: name: opentofu description: Opentofu YUM repo baseurl: https://packages.opentofu.org/opentofu/tofu/rpm_any/rpm_any/\$basearch repo_gpgcheck: 0 gpgcheck: 1 enabled: 1 gpgkey: https://get.opentofu.org/opentofu.gpg sslverify: 1 sslcacert: /etc/pki/tls/certs/ca-bundle.crt metadata_expire: 300 become: true - name: Install OpenTofu RPM ansible.builtin.dnf: name: tofu state: installed become: true - name: Return tofu to registered var ansible.builtin.command: which tofu register: tofu_binary_path