-
-
Notifications
You must be signed in to change notification settings - Fork 183
Expand file tree
/
Copy pathaix.yml
More file actions
131 lines (105 loc) · 3.41 KB
/
Copy pathaix.yml
File metadata and controls
131 lines (105 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
#
# Setup the filesystem to the correct sizes on AIX
#
- name: Set size of / to 1G
aix_filesystem:
filesystem: /
size: 1G
state: present
- name: Set size of /usr to 6G
aix_filesystem:
filesystem: /usr
size: 6G
state: present
- name: Set size of /var to 5G
aix_filesystem:
filesystem: /var
size: 5G
state: present
- name: Set size of /tmp to 2G
aix_filesystem:
filesystem: /tmp
size: 2G
state: present
- name: Set size of /home to 50G (If it fails try chlv -x 2048 on the LV for /home)
aix_filesystem:
filesystem: /home
size: 50G
state: present
- name: Set size of /opt to 12G
aix_filesystem:
filesystem: /opt
size: 12G
state: present
# This is to mount the AIX file event infrastructure to get the file watcher tests passing
- name: check for /aha filesystem
ansible.builtin.find:
file_type: any
paths: /aha
register: ahafs
- name: create /aha filesystem
ansible.builtin.file:
path: /aha
state: directory
- name: Mount /aha filesystem (if this fails install bos.ahafs)
shell:
cmd: mount -v ahafs /aha /aha
when: ahafs.matched == 0
- name: Set maximum processes per user
community.general.aix_devices:
device: sys0
attributes:
maxuproc: "512"
# Set consistent hostname with Ansible inventory.
- name: Check hostname
ansible.builtin.command: hostname
changed_when: no
register: current_hostname
- name: Set hostname to inventory_hostname AIX
ansible.builtin.command: hostname {{ inventory_hostname }}
when: current_hostname.stdout != inventory_hostname
- name: Ensure the python3-dnf package is up to date
shell:
cmd: /opt/freeware/bin/dnf install -y python3-dnf
- name: set pkg_mgr
ansible.builtin.set_fact:
ansible_facts:
pkg_mgr: dnf
- name: Check for presence of C++ ADT headers
changed_when: no
check_mode: no
command: "lslpp -l libc++.adt.include"
register: adtheaders_installed
ignore_errors: yes
# This is from https://www.ibm.com/support/pages/open-xl-cc-aix-utilities
- name: Download OpenXL utilities to /var/cache if needed
get_url:
checksum: sha256:0d8aba8d06ad403b00a44d5a4466cf55aaeb3a912f071ec840d2ff762a738e28
dest: "/var/cache/IBM_OPEN_XL_CPP_UTILITIES_17.1.4.1_AIX.tar.Z"
url: "https://public.dhe.ibm.com/aix/products/ccpp/xlc.rte.aix.17.1.4/IBM_OPEN_XL_CPP_UTILITIES_17.1.4.1_AIX.tar.Z"
register: clang_local
when: adtheaders_installed.rc != 0
- name: Create /tmpopenxlUtilities
file:
path: /tmp/openxlUtilities
state: directory
mode: 0700
when: adtheaders_installed.rc != 0
# "unarchive" function can't handle the tar.Z file, so call to shell instead
# which also makes it a bit easier to extract only the fileset we require
- name: Unpack OpenXL utilities
shell: "uncompress -c /var/cache/IBM_OPEN_XL_CPP_UTILITIES_17.1.4.1_AIX.tar.Z | tar xpf - -C /tmp/openxlUtilities libc++.adt.include"
when: adtheaders_installed.rc != 0
- name: Install C++ ADT headers from OpenXL utilities
command: "installp -qaFXYd /tmp/openxlUtilities libc++.adt.include"
when: adtheaders_installed.rc != 0
- name: Cleanup /tmp/openxlUtilities
file:
path: "/tmp/openxlUtilities"
state: absent
when: adtheaders_installed.rc != 0
# Ref: https://www.ibm.com/support/pages/understanding-aix-virtual-rpm-package-rpmrte
- name: Run updtvpkg to get ODM and DNF databases in sync
command: /usr/sbin/updtvpkg
when: adtheaders_installed.rc != 0