mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-27 13:53:06 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c666ccdaa | ||
|
|
976cd1baa7 | ||
|
|
5bed0d627b | ||
|
|
630c378ab1 | ||
|
|
0447143047 | ||
|
|
6e45d1ea06 | ||
|
|
be27a615d0 | ||
|
|
e2c6480fe0 | ||
|
|
873b69107e | ||
|
|
e2cb68de54 | ||
|
|
be1720e9ea | ||
|
|
90779ed7ab | ||
|
|
141554bd3d | ||
|
|
dff921039d | ||
|
|
2cc4c27fa3 | ||
|
|
38b3e817ad | ||
|
|
a292645a01 | ||
|
|
6ffc51a75f |
@@ -3,7 +3,7 @@ driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: centos-8-build
|
||||
image: centos:8
|
||||
image: "centos:centos8"
|
||||
pre_build_image: true
|
||||
hostname: ipaserver.test.local
|
||||
dns_servers:
|
||||
|
||||
@@ -3,7 +3,7 @@ driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: fedora-latest-build
|
||||
image: fedora-latest
|
||||
image: "fedora:latest"
|
||||
dockerfile: Dockerfile
|
||||
hostname: ipaserver.test.local
|
||||
dns_servers:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure permission TestPerm1 is absent
|
||||
- name: Ensure permission is absent
|
||||
ipapermission:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
state: absent
|
||||
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure permission TestPerm2 is present with Read rights to employeenumber
|
||||
- name: Ensure permission is present with set of rights to attribute employeenumber
|
||||
ipapermission:
|
||||
name: TestPerm2
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
object_type: user
|
||||
perm_rights:
|
||||
right:
|
||||
- read
|
||||
- search
|
||||
- compare
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure privilege User Administrators privilege is absent on Permission TestPerm1
|
||||
- name: Ensure permission privilege, "User Administrators", is absent
|
||||
ipapermission:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
privilege: "User Administrators"
|
||||
action: member
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure permission TestPerm1 is present with the User Administrators privilege present
|
||||
- name: Ensure permission is present with "User Administrators" privilege
|
||||
ipapermission:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
privilege: "User Administrators"
|
||||
action: member
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure permission TestPerm1 is present
|
||||
- name: Ensure permission is present
|
||||
ipapermission:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
object_type: host
|
||||
perm_rights: all
|
||||
right: all
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure permission TestPerm1 is present
|
||||
- name: Ensure permission TestPerm1 is renamed to TestPermRenamed
|
||||
ipapermission:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: TestPerm1
|
||||
rename: TestPermRenamed
|
||||
state: renamed
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Delegation absent
|
||||
- name: Selfservice absent
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure delegation "basic manager attributes" is absent
|
||||
ipadelegation:
|
||||
- name: Ensure selfservice "basic manager attributes" is absent
|
||||
ipaselfservice:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "basic manager attributes"
|
||||
state: absent
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
- name: Delegation member absent
|
||||
- name: Selfservice member absent
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure delegation "basic manager attributes" member attributes employeenumber and employeetype are absent
|
||||
ipadelegation:
|
||||
- name: Ensure selfservice "basic manager attributes" member attributes employeenumber and employeetype are absent
|
||||
ipaselfservice:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "basic manager attributes"
|
||||
attribute:
|
||||
- employeenumber
|
||||
- employeetype
|
||||
- businesscategory
|
||||
- departmentnumber
|
||||
action: member
|
||||
state: absent
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Delegation member present
|
||||
- name: Selfservice member present
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure delegation "basic manager attributes" member attribute departmentnumber is present
|
||||
ipadelegation:
|
||||
- name: Ensure selfservice "basic manager attributes" member attribute departmentnumber is present
|
||||
ipaselfservice:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "basic manager attributes"
|
||||
attribute:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: Delegation present
|
||||
- name: Selfservice present
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure delegation "basic manager attributes" is present
|
||||
ipadelegation:
|
||||
- name: Ensure selfservice "basic manager attributes" is present
|
||||
ipaselfservice:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "basic manager attributes"
|
||||
permission: read
|
||||
|
||||
@@ -429,16 +429,16 @@ def main():
|
||||
|
||||
# Generate addition and removal lists
|
||||
host_add, host_del = gen_add_del_lists(
|
||||
host, res_find.get('member_host', []))
|
||||
host, res_find.get('memberhost_host', []))
|
||||
|
||||
hostgroup_add, hostgroup_del = gen_add_del_lists(
|
||||
hostgroup, res_find.get('member_hostgroup', []))
|
||||
hostgroup, res_find.get('memberhost_hostgroup', []))
|
||||
|
||||
user_add, user_del = gen_add_del_lists(
|
||||
user, res_find.get('member_user', []))
|
||||
user, res_find.get('memberuser_user', []))
|
||||
|
||||
group_add, group_del = gen_add_del_lists(
|
||||
group, res_find.get('member_group', []))
|
||||
group, res_find.get('memberuser_group', []))
|
||||
|
||||
allow_cmd_add, allow_cmd_del = gen_add_del_lists(
|
||||
allow_sudocmd,
|
||||
|
||||
@@ -181,8 +181,12 @@
|
||||
# Do not fail on error codes 3 and 5:
|
||||
# 3 - Unable to open keytab
|
||||
# 5 - Principal name or realm not found in keytab
|
||||
# 7 - Failed to set cursor, typically when errcode
|
||||
# would be issued in past
|
||||
failed_when: result_ipa_rmkeytab.rc != 0 and
|
||||
result_ipa_rmkeytab.rc != 3 and result_ipa_rmkeytab.rc != 5
|
||||
result_ipa_rmkeytab.rc != 3 and
|
||||
result_ipa_rmkeytab.rc != 5 and
|
||||
result_ipa_rmkeytab.rc != 7
|
||||
when: (ipaclient_use_otp | bool or ipaclient_force_join | bool) and not ipaclient_on_master | bool
|
||||
|
||||
- name: Install - Backup and set hostname
|
||||
|
||||
@@ -15,7 +15,7 @@ trigger:
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
vmImage: 'ubuntu-20.04'
|
||||
|
||||
stages:
|
||||
- stage: Centos7
|
||||
|
||||
@@ -11,7 +11,7 @@ schedules:
|
||||
trigger: none
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-18.04'
|
||||
vmImage: 'ubuntu-20.04'
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
inputs:
|
||||
versionSpec: '3.6'
|
||||
|
||||
- script: python -m pip install --upgrade pip setuptools wheel
|
||||
- script: python -m pip install --upgrade pip setuptools wheel ansible
|
||||
displayName: Install tools
|
||||
|
||||
- script: pip install molecule[docker]
|
||||
|
||||
@@ -15,49 +15,61 @@ find . -name "*~" -exec rm {} \;
|
||||
sed -i -e "s/ansible.module_utils.ansible_freeipa_module/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_freeipa_module/" plugins/modules/*.py
|
||||
|
||||
(cd plugins/module_utils && {
|
||||
ln -s ../../roles/*/module_utils/*.py .
|
||||
ln -sf ../../roles/*/module_utils/*.py .
|
||||
})
|
||||
|
||||
(cd plugins/modules && {
|
||||
sed -i -e "s/ansible.module_utils.ansible_ipa_/ansible_collections.${collection_prefix}.plugins.module_utils.ansible_ipa_/" ../../roles/*/library/*.py
|
||||
ln -s ../../roles/*/library/*.py .
|
||||
ln -sf ../../roles/*/library/*.py .
|
||||
})
|
||||
|
||||
[ ! -x plugins/action_plugins ] && mkdir plugins/action_plugins
|
||||
(cd plugins/action_plugins && {
|
||||
ln -s ../../roles/*/action_plugins/*.py .
|
||||
ln -sf ../../roles/*/action_plugins/*.py .
|
||||
})
|
||||
|
||||
echo "Fixing examples in plugins/modules..."
|
||||
find plugins/modules -name "*.py" -print0 |
|
||||
while IFS= read -d -r '' line; do
|
||||
python utils/galaxyfy-module-EXAMPLES.py "$x" \
|
||||
while IFS= read -d '' -r line; do
|
||||
python utils/galaxyfy-module-EXAMPLES.py "$line" \
|
||||
"ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m"
|
||||
|
||||
echo "Fixing examples in roles/*/library..."
|
||||
find roles/*/library -name "*.py" -print0 |
|
||||
while IFS= read -d -r '' line; do
|
||||
python utils/galaxyfy-module-EXAMPLES.py "$x" \
|
||||
while IFS= read -d '' -r line; do
|
||||
python utils/galaxyfy-module-EXAMPLES.py "$line" \
|
||||
"ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing examples in roles/*/library... \033[32;1mDONE\033[0m"
|
||||
|
||||
for x in roles/*/tasks/*.yml; do
|
||||
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
|
||||
echo "Fixing playbooks in roles/*/tasks..."
|
||||
for line in roles/*/tasks/*.yml; do
|
||||
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing playbooks in roles/*tasks... \033[32;1mDONE\033[0m"
|
||||
|
||||
echo "Fixing playbooks in playbooks..."
|
||||
find playbooks -name "*.yml" -print0 |
|
||||
while IFS= read -d -r '' line; do
|
||||
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
|
||||
while IFS= read -d '' -r line; do
|
||||
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing playbooks in playbooks... \033[32;1mDONE\033[0m"
|
||||
|
||||
echo "Fixing README(s)..."
|
||||
find . -name "README*.md" -print0 |
|
||||
while IFS= read -d -r '' line; do
|
||||
python utils/galaxyfy-README.py "$x" "ipa" "$collection_prefix"
|
||||
while IFS= read -d '' -r line; do
|
||||
python utils/galaxyfy-README.py "$line" "ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing examples in plugins/modules... \033[32;1mDONE\033[0m"
|
||||
|
||||
echo "Fixing playbbooks in tests..."
|
||||
find tests -name "*.yml" -print0 |
|
||||
while IFS= read -d -r '' line; do
|
||||
python utils/galaxyfy-playbook.py "$x" "ipa" "$collection_prefix"
|
||||
while IFS= read -d '' -r line; do
|
||||
python utils/galaxyfy-playbook.py "$line" "ipa" "$collection_prefix"
|
||||
done
|
||||
echo -e "\033[AFixing playbooks in tests... \033[32;1mDONE\033[0m"
|
||||
|
||||
#git diff
|
||||
|
||||
|
||||
Reference in New Issue
Block a user