Skip to content
Open
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
3 changes: 3 additions & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ scp_if_ssh = True
become_user = root
become_method = sudo

[hosts:aix]
ansible_python_interpreter = /opt/freeware/libexec/python3

[hosts:smartos]
ansible_python_interpreter = /opt/local/bin/python

Expand Down
15 changes: 15 additions & 0 deletions ansible/roles/baselayout/tasks/partials/repo/aix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Appears to be some issue with the Ansible dnf task on AIX and gcc10-c++,
# so manage that package here.

- name: Check for gcc10-c++
ansible.builtin.command:
cmd: /opt/freeware/bin/dnf list installed gcc10-c++
changed_when: no
check_mode: no
failed_when: no
register: gcc10_installed

- name: Install gcc10-c++
ansible.builtin.command:
cmd: /opt/freeware/bin/dnf install -y gcc10-c++
when: gcc10_installed.rc != 0
8 changes: 5 additions & 3 deletions ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ common_packages: [
# % ansible -m debug -a "var=os" HOST
packages: {
aix: [
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python-setuptools,python3.9',
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python3-setuptools,python3',
],

# Appears to be some issue with the Ansible dnf task on AIX and gcc10-c++, so handle separately.
aix72: [
'gcc8-c++,gcc10-c++,gcc12-c++'
'gcc8-c++,gcc12-c++'
],

# Appears to be some issue with the Ansible dnf task on AIX and gcc10-c++, so handle separately.
aix73: [
'gcc8-c++,gcc10-c++,gcc12-c++'
'gcc8-c++,gcc12-c++'
],

ibmi: [
Expand Down
5 changes: 5 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/aix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@
- name: Set hostname to inventory_hostname AIX
ansible.builtin.command: hostname {{ inventory_hostname }}
when: current_hostname.stdout != inventory_hostname

- name: set pkg_mgr
ansible.builtin.set_fact:
ansible_facts:
pkg_mgr: dnf
1 change: 1 addition & 0 deletions ansible/roles/package-upgrade/tasks/partials/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
ansible.builtin.dnf:
name: "*"
state: latest
use_backend: "{{ os|startswith('aix')|ternary('dnf4', omit) }}"
notify: package updated
4 changes: 2 additions & 2 deletions ansible/roles/package-upgrade/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#

pm: {
'yum': ['centos', 'rhel7', 'aix72', 'ibmi'],
'yum': ['centos', 'rhel7', 'ibmi'],
'apt': ['debian', 'ubuntu'],
'dnf': ['aix73', 'fedora', 'rhel8', 'rhel9'],
'dnf': ['aix72', 'aix73', 'fedora', 'rhel8', 'rhel9'],
'pkgng': 'freebsd',
'pkgin': 'smartos',
'chocolatey': 'win',
Expand Down