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

Fix centos 7 x32 provision issues #101

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions Dockerfile.celery
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EOT
RUN <<EOT
set -ex
dnf install -y ansible
ansible-galaxy collection install community.general community.docker
ansible-galaxy collection install community.general community.docker ansible.posix
EOT

# Install Terraform
Expand All @@ -27,7 +27,7 @@ RUN <<EOT
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
dnf install -y terraform
mkdir -p /root/.terraform.d/plugin-cache
echo "plugin_cache_dir = /root/.terraform.d/plugin-cache" >> /root/.terraformrc
echo 'plugin_cache_dir = "$HOME/.terraform.d/plugin-cache"' >> /root/.terraformrc
echo "plugin_cache_may_break_dependency_lock_file = true" >> /root/.terraformrc
EOT

Expand Down
2 changes: 1 addition & 1 deletion alts/shared/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def __init__(self, **data):
'6': 'http://dl.fedoraproject.org/pub/archive/epel/6/x86_64/'
'epel-release-6-8.noarch.rpm',
'7': 'https://dl.fedoraproject.org/pub/archive/epel/7/x86_64/'
'Packages/e/epel-release-7-12.noarch.rpm',
'Packages/e/epel-release-7-14.noarch.rpm',
}
centos_baseurl: str = 'http://mirror.centos.org/centos'
git_reference_directory: Optional[str] = None
Expand Down
25 changes: 24 additions & 1 deletion resources/roles/preparation/tasks/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
set_fact:
centos_7_x32: false
bats_package: bats
final_centos_repo_baseurl: "{{ centos_repo_baseurl }}"

- name: Set fact about CentOS 7 x32 arch
set_fact:
centos_7_x32: true
bats_package: "http://ftp.icm.edu.pl/pub/Linux/dist/epel/7/x86_64/Packages/b/bats-0.4.0-1.20141016git3b33a5a.el7.noarch.rpm"
final_centos_repo_baseurl: "{{ centos_repo_baseurl }}/altarch"
centos_distro_version: "7"
when: >
ansible_facts.distribution_major_version == '7' and
ansible_facts.userspace_architecture in ('i386', 'i486', 'i586', 'i686')

- name: Set fact about distro version for CentOS 7 x86_64
set_fact:
centos_distro_version: "7.9.2009"
when: "ansible_facts.distribution_major_version == '7' and ansible_facts.userspace_architecture == 'x86_64'"

- name: Re-define procps package name
set_fact:
procps_pkg: "procps-ng"
Expand Down Expand Up @@ -40,7 +48,7 @@
- name: Add os and updates repositories for version 6
yum_repository:
name: "centos-6-{{ item }}"
baseurl: "{{ centos_repo_baseurl }}/6.10/{{ item }}/$basearch/"
baseurl: "{{ final_centos_repo_baseurl }}/6.10/{{ item }}/$basearch/"
description: "CentOS 6 {{ item }} repository"
enabled: yes
gpgcheck: yes
Expand All @@ -52,6 +60,21 @@
ansible_distribution_file_variety in ('RedHat', 'CentOS') and
ansible_facts.distribution_major_version == '6'

- name: Add os and updates repositories for version 7
yum_repository:
name: "centos-7-{{ item }}"
baseurl: "{{ final_centos_repo_baseurl }}/{{ centos_distro_version }}/{{ item }}/$basearch/"
description: "CentOS 7 {{ item }} repository"
enabled: yes
gpgcheck: yes
gpgkey: https://vault.centos.org/7.9.2009/os/x86_64/RPM-GPG-KEY-CentOS-7
with_items:
- "os"
- "updates"
when: >
ansible_distribution_file_variety in ('RedHat', 'CentOS') and
ansible_facts.distribution_major_version == '7'

- name: Add YUM proxy
ini_file:
path: /etc/yum.conf
Expand Down
Loading