Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Rocky Linux 9 #3

Merged
merged 4 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:

list-scenarios:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.listscenarios.outputs.scenarios }}
steps:
Expand All @@ -22,7 +22,7 @@ jobs:
name: Test
needs:
- list-scenarios
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
# Keep running so we can see if other tests pass
fail-fast: false
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
- name: Install Ansible & Molecule
run: |
pip install "ansible<8" "ansible-lint<6.13" flake8
Expand All @@ -46,7 +46,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags')
needs:
- test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Read the role name
Expand Down
4 changes: 2 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ galaxy_info:
description: Minio S3 gateway with additional restricted users
company: Open Microscopy Environment
license: BSD
min_ansible_version: 2.6
min_ansible_version: 2.10
platforms:
- name: EL
versions:
- 7
- 9
namespace: ome
role_name: minio_s3_gateway
galaxy_tags: []
22 changes: 0 additions & 22 deletions molecule/default/Dockerfile.j2

This file was deleted.

12 changes: 9 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ lint: |
flake8
platforms:
- name: minio
image: centos/systemd:latest
privileged: true
image: eniocarboni/docker-rockylinux-systemd:9
image_version: latest
command: /sbin/init
privileged: true
cgroupns_mode: host
tmpfs:
- /sys/fs/cgroup
groups:
- docker_hosts
- extra_options
- docker_hosts

provisioner:
name: ansible
lint:
Expand Down
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
# minio S3 gateway with custom users in front of an external S3 store
# https://github.com/minio/minio/issues/8045

- name: Install docker-py
- name: Install docker
become: true
yum:
name: docker-python
ansible.builtin.pip:
khaledk2 marked this conversation as resolved.
Show resolved Hide resolved
name: docker
state: present

- name: Create docker network
become: true
docker_network:
ansible.builtin.docker_network:
name: "{{ minio_s3_gateway_docker_network }}"

# Etcd required for multiple users on the S3 gateway
# https://github.com/minio/minio/blob/master/docs/sts/etcd.md
- name: Minio etcd
become: true
docker_container:
ansible.builtin.docker_container:
image: "{{ minio_s3_gateway_etcd_image }}"
# Workaround problem with etcd docker directory permissions
# Breaking change going from 3.4.9 → 3.4.10
Expand Down Expand Up @@ -49,7 +49,7 @@
# https://github.com/minio/minio/blob/master/docs/gateway/s3.md
- name: Minio s3 gateway
become: true
docker_container:
ansible.builtin.docker_container:
image: "{{ minio_s3_gateway_minio_image }}"
command: gateway s3 {{ minio_s3_gateway_remote_endpoint }}
name: minio-s3-gateway-minio
Expand Down
14 changes: 7 additions & 7 deletions tasks/minio-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- name: Download minio client
become: true
get_url:
ansible.builtin.get_url:
# Downloads the latest client, can't find a way to download a particular
# version
url:
Expand All @@ -14,14 +14,14 @@

- name: Copy minio-user.sh
become: true
template:
ansible.builtin.template:
src: minio-user.sh
dest: /usr/local/bin/minio-user.sh
mode: u=rwx,g=rx,o=rx

- name: Create config directories
become: true
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0755
Expand All @@ -31,21 +31,21 @@

- name: Copy policy-readwrite-subdir.json.template
become: true
copy:
ansible.builtin.copy:
src: policy-readwrite-subdir.json.template
dest: /etc/minio-s3-gateway/policy-readwrite-subdir.json.template
mode: 0644

- name: Create placeholder text file
become: true
copy:
ansible.builtin.copy:
content: "{{ minio_s3_gateway_placeholder_content }}"
dest: /etc/minio-s3-gateway/README.txt
mode: 0644

- name: Create root mc config
become: true
template:
ansible.builtin.template:
src: mc-config-json.j2
dest: /root/.mc/config.json
backup: true
Expand All @@ -54,7 +54,7 @@
# Needed so that it appears in the sudo PATH
- name: Symlink minio client and script to /usr/bin
become: true
file:
ansible.builtin.file:
path: /usr/bin/{{ item }}
src: /usr/local/bin/{{ item }}
state: link
Expand Down