ansible/node: Add tbuild node type
authorMartin Schwenke <martin@meltin.net>
Mon, 25 May 2020 08:16:01 +0000 (18:16 +1000)
committerMartin Schwenke <martin@meltin.net>
Thu, 13 Aug 2020 00:55:08 +0000 (10:55 +1000)
This node type downloads a tarball and builds clustered Samba.

Signed-off-by: Martin Schwenke <martin@meltin.net>
ansible/node/roles/tarball_build/tasks/generic/build_samba_list.yml [new file with mode: 0644]
ansible/node/roles/tarball_build/tasks/main.yml [new file with mode: 0644]
ansible/node/roles/tarball_build/tasks/redhat/packages.yml [new file with mode: 0644]
ansible/node/site.yml
ansible/node/tbuild.yml [new file with mode: 0644]

diff --git a/ansible/node/roles/tarball_build/tasks/generic/build_samba_list.yml b/ansible/node/roles/tarball_build/tasks/generic/build_samba_list.yml
new file mode 100644 (file)
index 0000000..20eb963
--- /dev/null
@@ -0,0 +1,9 @@
+---
+
+- name: process configured tarballs
+  include_role:
+    name: tarball_common
+    tasks_from: build_samba_maybe.yml
+  loop: "{{ [tarball] if tarball is not none else tarballs }}"
+  loop_control:
+    loop_var: source_tarball
diff --git a/ansible/node/roles/tarball_build/tasks/main.yml b/ansible/node/roles/tarball_build/tasks/main.yml
new file mode 100644 (file)
index 0000000..fc38328
--- /dev/null
@@ -0,0 +1,14 @@
+---
+- name: tasks specific to {{ ansible_os_family }}
+  include_tasks: "{{ ansible_os_family | lower }}/{{ task }}.yml"
+  loop:
+  - packages
+  loop_control:
+    loop_var: task
+
+- name: generic tasks
+  include_tasks: generic/{{ task }}.yml
+  loop:
+  - build_samba_list
+  loop_control:
+    loop_var: task
diff --git a/ansible/node/roles/tarball_build/tasks/redhat/packages.yml b/ansible/node/roles/tarball_build/tasks/redhat/packages.yml
new file mode 100644 (file)
index 0000000..65e9a0a
--- /dev/null
@@ -0,0 +1,8 @@
+---
+- name: install packages for tbuild node
+  package:
+    name:
+    # Performance co-pilot to allow build of CTDB pmda code
+    - pcp-libs
+    - pcp-libs-devel
+    state: present
index cfbc3f061dbab8add3331c76380462e6d09a664f..10962c84cac89a41e114754b18009f9f0332e029 100644 (file)
@@ -1,4 +1,5 @@
 ---
+- import_playbook: tbuild.yml
 - import_playbook: ad.yml
 - import_playbook: base.yml
 - import_playbook: build.yml
diff --git a/ansible/node/tbuild.yml b/ansible/node/tbuild.yml
new file mode 100644 (file)
index 0000000..ebb9df9
--- /dev/null
@@ -0,0 +1,7 @@
+---
+- hosts: tbuild_nodes
+  remote_user: root
+
+  roles:
+    - common
+    - tarball_build