Skip to content

Commit

Permalink
samba.install: Define git installation tasks
Browse files Browse the repository at this point in the history
Add necessary tasks to get samba and ctdb components installed from git
sources.

Signed-off-by: Anoop C S <[email protected]>
  • Loading branch information
anoopcs9 committed May 28, 2024
1 parent 97b96b1 commit a05bd46
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 0 deletions.
70 changes: 70 additions & 0 deletions playbooks/ansible/roles/samba.install/files/bootstrap-centos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/bin/bash

dnf install -y \
"@Development Tools" \
avahi-devel \
bind \
bison \
cups-devel \
dbus-devel \
docbook-style-xsl \
e2fsprogs-devel \
flex \
gcc \
gawk \
glibc-gconv-extra \
gnupg2 \
gnutls-devel \
gpgme-devel \
jansson-devel \
krb5-devel \
krb5-server \
libacl-devel \
libaio-devel \
libarchive-devel \
libattr-devel \
libcap-devel \
libcmocka-devel \
libicu-devel \
libtasn1-devel \
libtasn1-tools \
libtirpc-devel \
liburing-devel \
libuuid-devel \
libxslt \
lmdb \
lmdb-devel \
make \
mingw32-gcc \
mingw64-gcc \
ncurses-devel \
openldap-devel \
pam-devel \
'perl(Archive::Tar)' \
'perl(ExtUtils::MakeMaker)' \
'perl(FindBin)' \
perl-interpreter \
'perl(Parse::Yapp)' \
'perl(Test::More)' \
perl-generators \
popt-devel \
python3-cryptography \
python3-dateutil \
python3-devel \
python3-dns \
python3-gpg \
python3-iso8601 \
python3-markdown \
python3-pyasn1 \
python3-requests \
python3-setproctitle \
python3-setuptools \
quota-devel \
readline-devel \
rpcgen \
rpcsvc-proto-devel \
systemd-devel \
systemd-rpm-macros \
xfsprogs-devel \
xz \
zlib-devel
3 changes: 3 additions & 0 deletions playbooks/ansible/roles/samba.install/tasks/git/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- name: Install common dependencies
script: bootstrap-centos.sh
37 changes: 37 additions & 0 deletions playbooks/ansible/roles/samba.install/tasks/git/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
- name: Process OS specific tasks
include_tasks: "{{ include_file }}"
vars:
prefix: "{{ role_path }}/tasks/git/"
with_first_found:
- files: "{{ [prefix] | product(config.os[site.os].includes) | map('join') | list }}"
loop_control:
loop_var: include_file

- name: Install backend specific packages
include_role:
name: "sit.{{ config.be.name }}"
tasks_from: git/main.yml

- name: Setup git repository
git:
repo: "{{ config.install.samba.git.repo }}"
dest: "{{ config.install.samba.git.dest }}"
version: "{{ config.install.samba.git.version }}"
refspec: "{{ config.install.samba.git.refspec }}"

- name: Configure samba installation(backend specific)
include_role:
name: "sit.{{ config.be.name }}"
tasks_from: git/configure.yml

- name: Install samba and ctdb
command: make -j install
args:
chdir: "{{ config.install.samba.git.dest }}"

- name: Prepare the installation
shell: |
ldconfig
systemctl daemon-reload
restorecon -vR /etc /run /usr/bin /usr/sbin /usr/libexec /usr/lib64 /usr/share /usr/lib/systemd/system /var/lib /var/log
4 changes: 4 additions & 0 deletions playbooks/ansible/roles/samba.install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
- name: Install samba and ctdb from rpm repositories
when: config.install.samba.repo is defined
include_tasks: repo/main.yml

- name: Install samba and ctdb from git sources
when: config.install.samba.git is defined
include_tasks: git/main.yml
6 changes: 6 additions & 0 deletions playbooks/ansible/roles/sit.cephfs/tasks/git/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Install CephFS API development packages
yum:
name:
- libcephfs-devel
- librados-devel
32 changes: 32 additions & 0 deletions playbooks/ansible/roles/sit.cephfs/tasks/git/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
- name: Configure with Ceph components
command: >-
./configure --enable-debug \
--prefix=/usr \
--enable-fhs \
--sysconfdir=/etc \
--libdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--with-piddir=/run \
--with-sockets-dir=/run/samba \
--with-lockdir=/var/lib/samba/lock \
--with-statedir=/var/lib/samba \
--with-cachedir=/var/lib/samba \
--disable-rpath-install \
--with-quotas \
--bundled-libraries=!zlib,!popt,talloc,pytalloc,pytalloc-util,tevent,pytevent,tdb,pytdb,ldb,pyldb,pyldb-util \
--with-pam \
--with-pie \
--with-relro \
--without-fam \
--with-system-mitkrb5 \
--with-experimental-mit-ad-dc \
--disable-glusterfs \
--with-cluster-support \
--enable-ceph-reclock \
--with-profiling-data \
--with-systemd \
--systemd-install-services
args:
chdir: "{{ config.install.samba.git.dest }}"
9 changes: 9 additions & 0 deletions playbooks/ansible/roles/sit.cephfs/tasks/git/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Process OS specific tasks
include_tasks: "{{ include_file }}"
vars:
prefix: "{{ role_path }}/tasks/git/"
with_first_found:
- files: "{{ [prefix] | product(config.os[site.os].includes) | map('join') | list }}"
loop_control:
loop_var: include_file
6 changes: 6 additions & 0 deletions playbooks/ansible/roles/sit.glusterfs/tasks/git/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Install GlusterFS API development packages
yum:
name:
- libgfapi-devel
- libglusterfs-devel
31 changes: 31 additions & 0 deletions playbooks/ansible/roles/sit.glusterfs/tasks/git/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- name: Configure with GlusterFS components
command: >-
./configure --enable-debug \
--prefix=/usr \
--enable-fhs \
--sysconfdir=/etc \
--libdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--with-piddir=/run \
--with-sockets-dir=/run/samba \
--with-lockdir=/var/lib/samba/lock \
--with-statedir=/var/lib/samba
--with-cachedir=/var/lib/samba \
--disable-rpath-install \
--with-quotas \
--bundled-libraries=!zlib,!popt,talloc,pytalloc,pytalloc-util,tevent,pytevent,tdb,pytdb,ldb,pyldb,pyldb-util \
--with-pam \
--with-pie \
--with-relro \
--without-fam \
--with-system-mitkrb5 \
--with-experimental-mit-ad-dc \
--disable-cephfs \
--with-cluster-support \
--with-profiling-data \
--with-systemd \
--systemd-install-services
args:
chdir: "{{ config.install.samba.git.dest }}"
9 changes: 9 additions & 0 deletions playbooks/ansible/roles/sit.glusterfs/tasks/git/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Process OS specific tasks
include_tasks: "{{ include_file }}"
vars:
prefix: "{{ role_path }}/tasks/git/"
with_first_found:
- files: "{{ [prefix] | product(config.os[site.os].includes) | map('join') | list }}"
loop_control:
loop_var: include_file
32 changes: 32 additions & 0 deletions playbooks/ansible/roles/sit.gpfs/tasks/git/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
- name: Configure for standard file systems
command: >-
./configure --enable-debug \
--prefix=/usr \
--enable-fhs \
--sysconfdir=/etc \
--libdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--with-piddir=/run \
--with-sockets-dir=/run/samba \
--with-lockdir=/var/lib/samba/lock \
--with-statedir=/var/lib/samba \
--with-cachedir=/var/lib/samba \
--disable-rpath-install \
--with-quotas \
--bundled-libraries=!zlib,!popt,talloc,pytalloc,pytalloc-util,tevent,pytevent,tdb,pytdb,ldb,pyldb,pyldb-util \
--with-pam \
--with-pie \
--with-relro \
--without-fam \
--with-system-mitkrb5 \
--with-experimental-mit-ad-dc \
--disable-cephfs \
--disable-glusterfs \
--with-cluster-support \
--with-profiling-data \
--with-systemd \
--systemd-install-services
args:
chdir: "{{ config.install.samba.git.dest }}"
1 change: 1 addition & 0 deletions playbooks/ansible/roles/sit.gpfs/tasks/git/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---
32 changes: 32 additions & 0 deletions playbooks/ansible/roles/sit.xfs/tasks/git/configure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
- name: Configure for standard file systems
command: >-
./configure --enable-debug \
--prefix=/usr \
--enable-fhs \
--sysconfdir=/etc \
--libdir=/usr/lib64 \
--localstatedir=/var \
--sharedstatedir=/var/lib \
--with-piddir=/run \
--with-sockets-dir=/run/samba \
--with-lockdir=/var/lib/samba/lock \
--with-statedir=/var/lib/samba \
--with-cachedir=/var/lib/samba \
--disable-rpath-install \
--with-quotas \
--bundled-libraries=!zlib,!popt,talloc,pytalloc,pytalloc-util,tevent,pytevent,tdb,pytdb,ldb,pyldb,pyldb-util \
--with-pam \
--with-pie \
--with-relro \
--without-fam \
--with-system-mitkrb5 \
--with-experimental-mit-ad-dc \
--disable-cephfs \
--disable-glusterfs \
--with-cluster-support \
--with-profiling-data \
--with-systemd \
--systemd-install-services
args:
chdir: "{{ config.install.samba.git.dest }}"
1 change: 1 addition & 0 deletions playbooks/ansible/roles/sit.xfs/tasks/git/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
---

0 comments on commit a05bd46

Please sign in to comment.