Git Product home page Git Product logo

ansible-role-crio's Introduction

CI

日本語版はこちら

Ansible Role: crio

Install CRI-O on a RHEL/CentOS or Debian/Ubuntu server.

This role will do the following.

  • Load Kernel module.
  • Configure Kernel parameters.
  • Install CRI-O.
  • Configure CRI-O.

Requirements

There are no special requirements for this role.

Role Variables

crio_version: "1.24"

Specifies the version of CRI-O to install. You can specify either "X.Y" or "X.Y.Z" format. Cannot include *.

crio_sysctl_filename: "/etc/sysctl.d/99-kubernetes-cri.conf"

Specifies the filename to save the Kernel parameter settings.

crio_os: Debian_10

Specifies the OS of the host on which to install.

The value to specify for each OS is the value of $OS as described in cri-o installation instructions, but as of May 2022, the linked information seems to be out of date. From my research, the currently valid OS specification is as follows.

Operating system $OS (crio_os)
CentOS 7 CentOS_7
CentOS 8 CentOS_8
CentOS 8 Stream CentOS_8_Stream
Debian 10 Debian_10
Debian 11 Debian_11
Fedora 35 Fedora_35
Fedora Rawhide Fedora_Rawhide
Raspbian 10 Raspbian_10
Raspbian 11 Raspbian_11
Ubuntu 18.04 xUbuntu_18.04
Ubuntu 20.04 xUbuntu_20.04
Ubuntu 21.10 xUbuntu_21.10
Ubuntu 22.04 xUbuntu_22.04

Note that the valid OS depends on the version of CRI-O. The available OS for each version can be found at openSUSE Download. Select the version of CRI-O you wish to install from openSUSE Download and check the directory name displayed.

If your OS has files under vars/, crio_os will be set automatically and you do not need to specify it.

crio_version_url: '1.24'

This parameter is used as part of the URL of the CRI-O repository. It may be in the form X.Y or X.Y:/X.Y.Z. (e.g., 1.24 or 1.24:/1.24.0)

You don't need to specify the value of crio_version, since it is automatically set from the value of crio_version.

crio_long_version: '1.24'

This parameter specifies the version of CRI-O in long form. It is specified in either X.Y or X.Y:X.Y.Z format. (e.g., 1.24 or 1.24:1.24.0) The format is similar to crio_version_url, but with or without /.

It is automatically set from the value of crio_version, so you don't need to specify it.

crio_conf: {}

This parameter specifies the contents of crio.conf. See https://github.com/cri-o/cri-o/blob/main/docs/crio.conf.5.md for parameters that can be specified in crio.conf.

crio_conf can be specified as follows:

crio_conf:
  "table":
    option: value
  "table.subtable1":
    option: value
  "table.subtable2":
    option: value

In this case, crio.conf outputs the following:

[table]
option = value

[table.subtable1]
option = value

[table.subtable2]
option = value

See crio_conf.yml.example for a more realistic specificatioin.

Role Tags

crio-repo-key

The crio-repo-key tag can be used to update keys used in the CRI-O apt repository.

It does not perform tasks such as updating the apt repository cache, updating CRI-O packages, or changing settings. Use this function only for updating keys, such as when a key has expired.

Dependencies

None.

Example Playbook

- hosts: crio_servers
  roles:
    - ktooi.crio

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Translated with www.DeepL.com/Translator (free version)

ansible-role-crio's People

Contributors

ktooi avatar

Stargazers

 avatar

Watchers

 avatar

ansible-role-crio's Issues

Molecule (ubuntu2204) の Job が fail する

Molecule の converge を実行しようとした際に job が fail している。

ubuntu2204 のイメージでのみ発生しており、 Gathering Facts のタスクで fatal が出力されていることから、 Role の更新は関係なさそう。
以前は同様の問題は発生していなかった。更新されたイメージの問題?

https://github.com/ktooi/ansible-role-crio/actions/runs/4364865678/jobs/7632820534

INFO     Running default > converge
Molecule default > converge
  
  PLAY [Converge] ****************************************************************
  
  TASK [Gathering Facts] *********************************************************
  fatal: [instance]: UNREACHABLE! => {"changed": false, "msg": "Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \"/tmp\", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p \"` echo ~/.ansible/tmp `\"&& mkdir \"` echo ~/.ansible/tmp/ansible-tmp-1678283193.9046543-2787-22166436641[105](https://github.com/ktooi/ansible-role-crio/actions/runs/4364865678/jobs/7632820534#step:6:113)1 `\" && echo ansible-tmp-1678283193.9046543-2787-2216643664[110](https://github.com/ktooi/ansible-role-crio/actions/runs/4364865678/jobs/7632820534#step:6:118)51=\"` echo ~/.ansible/tmp/ansible-tmp-1678283193.9046543-2787-221664366411051 `\" ), exited with result 1", "unreachable": true}
  
  PLAY RECAP *********************************************************************
  instance                   : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
  
  WARNING  Retrying execution failure 4 of: ansible-playbook --diff --inventory /home/runner/.cache/molecule/ktooi.crio/default/inventory --skip-tags molecule-notest,notest /home/runner/work/ansible-role-crio/ansible-role-crio/ktooi.crio/molecule/default/converge.yml
  CRITICAL Ansible return code was 4, command was: ['ansible-playbook', '--diff', '--inventory', '/home/runner/.cache/molecule/ktooi.crio/default/inventory', '--skip-tags', 'molecule-notest,notest', '/home/runner/work/ansible-role-crio/ansible-role-crio/ktooi.crio/molecule/default/converge.yml']
WARNING  An error occurred during the test sequence action: 'converge'. Cleaning up.

apt-key deprecation warning

Ubuntu 22.04 にて apt-key が非推奨となり、下記の警告が出力されるようになった。

Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

apt-key を利用せず、推奨されているサードパーティーの鍵とリポジトリを直接結び付ける方法に変更する。

FYI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.