Skip to content

Commit

Permalink
Merge pull request #1681 from Azure/fix/1679
Browse files Browse the repository at this point in the history
fix domain join package list for AlmaLinux
  • Loading branch information
xpillons authored Sep 13, 2023
2 parents f1101bf + ddd102e commit d397d28
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
3 changes: 3 additions & 0 deletions azhop_state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,15 @@ case $COMMAND in
echo "Resource group is empty, exiting"
exit 1
fi
BICEP_PARAMS=$RESOURCE_GROUP.parameters.json
# Copy state files into the state directory
mkdir -p $STATE_DIR
cp $AZHOP_CONFIG $STATE_DIR
ADMIN_USER=$(yq eval '.admin_user' $AZHOP_CONFIG)
cp ${ADMIN_USER}_id_rsa $STATE_DIR
cp ${ADMIN_USER}_id_rsa.pub $STATE_DIR
cp ${BICEP_PARAMS} $STATE_DIR

mkdir -p $STATE_DIR/packer
cp packer/options.json $STATE_DIR/packer/options.json
mkdir -p $STATE_DIR/playbooks/group_vars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
packages="sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python-utils"
packages="sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients python3-policycoreutils"

if ! rpm -q $packages; then
echo "Installing packages $packages"
Expand Down
17 changes: 16 additions & 1 deletion playbooks/roles/domain_join/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
---
- name: Include distribution variables
block:
- name: Include distribution variables
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}/{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution }}.yml"
tags: [ 'always' ]
rescue:
- name: Change error message
ansible.builtin.fail:
msg: "unable to find anything in vars/ for this operating system! {{ ansible_distribution }}"

- name: Install dependencies
yum:
name: epel-release, sssd, realmd, oddjob, oddjob-mkhomedir, adcli, samba-common, samba-common-tools, krb5-workstation, openldap-clients, policycoreutils-python, nfs-utils, python3
name: '{{item}}'
lock_timeout : 180
loop: '{{domain_join_packages}}'
notify: restart dbus

- name: Disable SELinux
Expand Down
14 changes: 14 additions & 0 deletions playbooks/roles/domain_join/vars/AlmaLinux/8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
domain_join_packages:
- epel-release
- sssd
- realmd
- oddjob
- oddjob-mkhomedir
- adcli
- samba-common
- samba-common-tools
- krb5-workstation
- openldap-clients
- python3-policycoreutils
- nfs-utils
- python3
14 changes: 14 additions & 0 deletions playbooks/roles/domain_join/vars/CentOS/7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
domain_join_packages:
- epel-release
- sssd
- realmd
- oddjob
- oddjob-mkhomedir
- adcli
- samba-common
- samba-common-tools
- krb5-workstation
- openldap-clients
- policycoreutils-python
- nfs-utils
- python3

0 comments on commit d397d28

Please sign in to comment.