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
1 change: 1 addition & 0 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ become_method = sudo

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

[hosts:smartos]
ansible_python_interpreter = /opt/local/bin/python
Expand Down
12 changes: 12 additions & 0 deletions ansible/roles/baselayout/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,15 @@
- "{{ role_path }}/tasks/partials/ntp/{{ os|stripversion }}.yml"
- "{{ role_path }}/tasks/partials/ntp/{{ os|match_key(ntp_service, raise_error=False) }}.yml"
skip: true


- name: install clang
include_tasks: "{{ clang_include }}"
loop_control:
loop_var: clang_include
with_first_found:
- files:
- "{{ role_path }}/tasks/partials/clang/{{ os }}-{{ arch }}.yml"
- "{{ role_path }}/tasks/partials/clang/{{ os }}.yml"
- "{{ role_path }}/tasks/partials/clang/{{ os|stripversion }}.yml"
skip: true
46 changes: 46 additions & 0 deletions ansible/roles/baselayout/tasks/partials/clang/aix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
#
# Downloads and installs clang
#

- name: Check if clang is already installed
changed_when: no
check_mode: no
command: "/opt/clang+llvm-20.1.7-powerpc64-ibm-aix-7.2/bin/clang --version"
register: clang
ignore_errors: yes

# If we're already using the latest there is no need to do anything.
# TODO improve the error handling
- name: check existing clang version is up to date
set_fact:
update_clang: "{{ 'clang version 20.1.7' not in clang.stdout }}"

- name: create cache directory for clang binaries
file:
path: "/var/cache/clang-binaries"
state: directory
when: update_clang == True

- name: download clang binary
get_url:
checksum: sha256:a18aea07f5b977e64bc7fe7358e95897c7ba05fbe68eeefb1614631347be4b3a
dest: "/var/cache/clang-binaries/clang+llvm-20.1.7-powerpc64-ibm-aix-7.2.tar.xz"
url: "https://github.com/IBM/llvm-project/releases/download/llvmorg-20.1.7/clang+llvm-20.1.7-powerpc64-ibm-aix-7.2.tar.xz"
register: clang_local
when: update_clang == True

- name: unpack clang binary
register: clang_unpacked
unarchive:
dest: "/opt/"
list_files: yes
remote_src: yes
src: "{{ clang_local.dest }}"
when: update_clang == True


- name: Check if we have a runnable clang
changed_when: no
check_mode: no
ansible.builtin.command: "/opt/clang+llvm-20.1.7-powerpc64-ibm-aix-7.2/bin/clang --version"
2 changes: 1 addition & 1 deletion ansible/roles/baselayout/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ common_packages: [
# % ansible -m debug -a "var=os" HOST
packages: {
aix: [
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python3-setuptools,python3',
'bash,cmake,coreutils,curl,gcc-c++,tar,unzip,git,make,sudo,python3-setuptools,python3,xz',
],

# Appears to be some issue with the Ansible dnf task on AIX and gcc10-c++, so handle separately.
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/bootstrap/tasks/partials/aix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
size: 6G
state: present

- name: Set size of /var to 2G
- name: Set size of /var to 5G
aix_filesystem:
filesystem: /var
size: 2G
size: 5G
state: present

- name: Set size of /tmp to 2G
Expand All @@ -34,10 +34,10 @@
size: 50G
state: present

- name: Set size of /opt to 5G
- name: Set size of /opt to 12G
aix_filesystem:
filesystem: /opt
size: 5G
size: 12G
state: present

# This is to mount the AIX file event infrastructure to get the file watcher tests passing
Expand Down