Skip to content

Commit

Permalink
Add crio-repo-key tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktooi committed Mar 8, 2023
1 parent afd685a commit e979a6d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,14 @@ option = value

See [crio_conf.yml.example](./defaults/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.
Expand Down
8 changes: 8 additions & 0 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ option = value
より実例に近い指定については、 [crio_conf.yml.example](./defaults/crio_conf.yml.example) を参照してください。
## Role Tags
### crio-repo-key
`crio-repo-key` タグを利用することで、 CRI-O の apt リポジトリで使用する key の更新を行うことができます。
apt リポジトリのキャッシュの更新や、 CRI-O のパッケージ更新、設定変更等のタスクは実行しません。 key の有効期限が切れた場合など、 key の更新のみを実行する際に利用してください。
## Dependencies
None.
Expand Down
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
- files:
- "setup-{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "setup-{{ ansible_os_family }}.yml"
tags:
- always
- include_tasks: "configure.yml"
6 changes: 6 additions & 0 deletions tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
mode: "0755"
state: directory
become: true
tags:
- crio-repo-key

- name: Add an apt key of cri-o utils
get_url:
url: "{{ crio_apt_repo_key_url }}"
dest: "{{ crio_apt_repo_key_dest }}"
force: true
become: true
tags:
- crio-repo-key

- name: Add an apt repository of cri-o utils
apt_repository:
Expand All @@ -30,6 +34,8 @@
dest: "{{ crio_apt_crio_repo_key_dest }}"
force: true
become: true
tags:
- crio-repo-key

- name: Add an apt repository of cri-o
apt_repository:
Expand Down
12 changes: 12 additions & 0 deletions tasks/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,40 @@
set_fact:
crio_os: "{{ __crio_os }}"
when: crio_os is not defined
tags:
- always

- name: Define crio_install_version
set_fact:
crio_install_version: "{{ crio_version ~ '~*' if crio_version.split('.') | length > 2 else crio_version ~ '.*' }}"
when: crio_install_version is not defined
tags:
- always

- name: Define crio_long_version
set_fact:
crio_long_version: "{{ crio_version.split('.')[0:2] | join('.') ~ ':' ~ crio_version if crio_version.split('.') | length > 2 else crio_version }}" # yamllint disable-line rule:line-length
when: crio_long_version is not defined
tags:
- always

- name: Define crio_version_url
set_fact:
crio_version_url: "{{ crio_version.split('.')[0:2] | join('.') ~ ':/' ~ crio_version if crio_version.split('.') | length > 2 else crio_version }}" # yamllint disable-line rule:line-length
when: crio_version_url is not defined
tags:
- always

- name: Define crio_apt_backports_repo_enable
set_fact:
crio_apt_backports_repo_enable: "{{ __crio_apt_backports_repo_enable | default(false) }}"
when: crio_apt_backports_repo_enable is not defined
tags:
- always

- name: Define crio_backports_packages
set_fact:
crio_backports_packages: "{{ __crio_backports_packages | default([]) }}"
when: crio_backports_packages is not defined
tags:
- always

0 comments on commit e979a6d

Please sign in to comment.