Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/4.6.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Mar 2, 2021
2 parents b04979c + 6925784 commit 35ce367
Show file tree
Hide file tree
Showing 43 changed files with 82 additions and 103 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.pyc
*.rej
*.retry
.cache
__pycache__

inventory/*/
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Major Changes

- Simplify Python dependency with system packages
- Support RHEL 8 with Molecule
- Support RHEL 7 with Molecule
- Remove CentOS 8 support
Expand Down
5 changes: 0 additions & 5 deletions ansible-galaxy-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ collections:
- name: operator_sdk.util
src: https://galaxy.ansible.com
version: ">=0.0.0,<1.0.0"

roles:
- name: python
src: https://github.com/alvistack/ansible-role-python
version: develop
1 change: 1 addition & 0 deletions molecule/centos-7/cleanup.yml
1 change: 0 additions & 1 deletion molecule/centos-7/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/centos-8-stream/cleanup.yml
1 change: 0 additions & 1 deletion molecule/centos-8-stream/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/debian-10/cleanup.yml
1 change: 0 additions & 1 deletion molecule/debian-10/side_effect.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
subscription-manager remove --all
subscription-manager unregister
subscription-manager clean
when: inventory_hostname != ansible_host
changed_when: false
ignore_errors: true
4 changes: 0 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
remote_user: root
become: true
tasks:
- include_role:
name: python
tags: python

- include_role:
name: kata
tags: kata
80 changes: 63 additions & 17 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,47 @@
remote_user: root
become: true
gather_facts: false
tasks:
- name: redhat | subscription-manager register
raw: |
set -eu
subscription-manager register \
--username={{ lookup('env', 'REDHAT_USERNAME') }} \
--password={{ lookup('env', 'REDHAT_PASSWORD') }} \
--auto-attach
changed_when: false
ignore_errors: true

- name: debian | apt-get install python3 python3-dev
raw: |
set -eu
apt-get update
apt-get dist-upgrade -y
apt-get install -y python3 python3-dev
changed_when: false
ignore_errors: true

- name: redhat | yum install python3 python3-devel
raw: |
set -eu
yum makecache
yum update -y
yum install -y python3 python3-devel
changed_when: false
ignore_errors: true

- name: suse | zypper install python3 python3-devel
raw: |
set -eu
zypper -n --gpg-auto-import-keys refresh
zypper -n update -y
zypper -n install -y python3 python3-devel
changed_when: false
ignore_errors: true

- hosts: all
remote_user: root
become: true
tasks:
- name: cp -rfT /etc/skel /root
raw: |
Expand Down Expand Up @@ -50,39 +91,44 @@
changed_when: false
ignore_errors: true

- name: redhat | subscription-manager register
- name: debian | apt-get install *.deb
raw: |
set -eu
subscription-manager register \
--username={{ lookup('env', 'REDHAT_USERNAME') }} \
--password={{ lookup('env', 'REDHAT_PASSWORD') }} \
--auto-attach
apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
when: ansible_os_family | lower == "debian"
changed_when: false
ignore_errors: true

- name: debian | apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
- name: fedora-33 | yum install *.rpm
raw: |
set -eu
apt-get update
apt-get dist-upgrade -y
apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
when: ansible_distribution | lower == "fedora" and ansible_distribution_major_version | lower == "33"
changed_when: false
ignore_errors: true

- name: redhat | yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
- name: redhat-8 | yum install *.rpm
raw: |
set -eu
yum makecache
yum update -y
yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "8"
changed_when: false
ignore_errors: true

- name: suse | zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
- name: redhat-7 | yum install *.rpm
raw: |
set -eu
zypper -n --gpg-auto-import-keys refresh
zypper -n update -y
zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-devel python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel python36-cryptography python3-jmespath sudo tar unzip xz yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "7"
changed_when: false
ignore_errors: true

- name: suse | zypper -n install *.rpm
raw: |
set -eu
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
when: ansible_os_family | lower == "suse"
changed_when: false
ignore_errors: true
1 change: 1 addition & 0 deletions molecule/fedora-33/cleanup.yml
1 change: 0 additions & 1 deletion molecule/fedora-33/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/opensuse-leap-15.2/cleanup.yml
1 change: 0 additions & 1 deletion molecule/opensuse-leap-15.2/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/opensuse-tumbleweed/cleanup.yml
1 change: 0 additions & 1 deletion molecule/opensuse-tumbleweed/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/rhel-7/cleanup.yml
1 change: 0 additions & 1 deletion molecule/rhel-7/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/rhel-8/cleanup.yml
1 change: 0 additions & 1 deletion molecule/rhel-8/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/ubuntu-18.04/cleanup.yml
1 change: 0 additions & 1 deletion molecule/ubuntu-18.04/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/ubuntu-20.04/cleanup.yml
1 change: 0 additions & 1 deletion molecule/ubuntu-20.04/side_effect.yml

This file was deleted.

1 change: 1 addition & 0 deletions molecule/ubuntu-20.10/cleanup.yml
1 change: 0 additions & 1 deletion molecule/ubuntu-20.10/side_effect.yml

This file was deleted.

12 changes: 5 additions & 7 deletions scripts/bootstrap-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,26 @@ cd "$(cd "$(dirname "$0")"; pwd -P)/../"
if [ -x "$(command -v apt-get)" ]; then
apt-get update
apt-get dist-upgrade -y
apt-get install -y ca-certificates curl gcc iproute2 python3 python3-dev sudo
apt-get install -y bzip2 ca-certificates curl gcc gnupg gzip iproute2 procps python3 python3-apt python3-cryptography python3-dev python3-jmespath python3-lxml python3-pip python3-setuptools python3-venv python3-virtualenv python3-wheel sudo tar unzip xz-utils zip
fi

# Prepare YUM dependencies
if [ -x "$(command -v yum)" ]; then
yum makecache
yum update -y
yum install -y ca-certificates curl gcc iproute python3 python3-devel sudo
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
fi

# Prepare Zypper dependencies
if [ -x "$(command -v zypper)" ]; then
zypper -n --gpg-auto-import-keys refresh
zypper -n update -y
zypper -n install -y ca-certificates curl gcc iproute2 python3 python3-devel sudo
zypper -n install -y bzip2 ca-certificates curl gcc gpg2 gzip iproute2 procps python3 python3-cryptography python3-devel python3-jmespath python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz zip
fi

# Install PIP
curl -skL https://bootstrap.pypa.io/get-pip.py | python3 - --prefix=/usr/local

# Install PIP dependencies
pip3 install --prefix=/usr/local --upgrade --requirement requirements.txt
pip3 install --prefix=/usr/local --upgrade pipx
PIPX_HOME=/usr/local/share/pipx PIPX_BIN_DIR=/usr/local/bin pipx install --include-deps --pip-args "--upgrade --requirement requirements.txt" ansible

# Install Ansible Collection dependencies
ansible-galaxy collection install --force --requirements-file ansible-galaxy-requirements.yml
8 changes: 0 additions & 8 deletions tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,3 @@
# 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: apt-get install
apt:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _apt }}"
register: result
until: result is succeeded
8 changes: 0 additions & 8 deletions tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,3 @@
# 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: yum install
yum:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _yum }}"
register: result
until: result is succeeded
10 changes: 0 additions & 10 deletions tasks/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,3 @@
# 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: zypper install
vars:
ansible_python_interpreter: "python3"
zypper:
name: "{{ item.name }}"
state: "{{ item.state }}"
loop: "{{ _zypper }}"
register: result
until: result is succeeded
3 changes: 0 additions & 3 deletions vars/centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_yum:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/centos-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_yum:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/debian-10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_apt:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/fedora-33.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_yum:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/redhat-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_yum:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/redhat-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_yum:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/suse-15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_zypper:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_zypper:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/ubuntu-18.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_apt:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/ubuntu-20.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_apt:
- { state: "latest", name: "tar" }
3 changes: 0 additions & 3 deletions vars/ubuntu-20.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
# 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.

_apt:
- { state: "latest", name: "tar" }

0 comments on commit 35ce367

Please sign in to comment.