Skip to content
Snippets Groups Projects
Select Git revision
  • 8fe41495a0aded0b5d3be65dfb51d6dc5ef1f67d
  • master default protected
  • v1.14.7
  • v1.14.6
  • v1.14.5
  • v1.14.4
  • v1.14.3
  • v1.14.2
  • v1.14.1
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.1
  • v1.12.0
  • v1.11.1
  • v1.11.0
  • v1.10.0
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.4
22 results

README-dnsrecord.md

Blame
    • Rafael Guterres Jeffman's avatar
      a834de1f
      ipadnsrecord: Allow execution of plugin in client host. · a834de1f
      Rafael Guterres Jeffman authored
      Update dnsrecord README file and add tests for executing plugin with
      `ipaapi_context` set to `client`.
      
      A new test playbook can be found at:
      
          tests/dnsrecord/test_dnsrecord_client_context.yml
      
      The new test file can be executed in a FreeIPA client host that is
      not a server. In this case, it should be defined in the `ipaclients`
      group, in the inventory file.
      a834de1f
      History
      ipadnsrecord: Allow execution of plugin in client host.
      Rafael Guterres Jeffman authored
      Update dnsrecord README file and add tests for executing plugin with
      `ipaapi_context` set to `client`.
      
      A new test playbook can be found at:
      
          tests/dnsrecord/test_dnsrecord_client_context.yml
      
      The new test file can be executed in a FreeIPA client host that is
      not a server. In this case, it should be defined in the `ipaclients`
      group, in the inventory file.
    build-galaxy-release.sh 2.91 KiB
    #!/bin/bash
    
    namespace="${1-freeipa}"
    collection="${2-ansible_freeipa}"
    collection_prefix="${namespace}.${collection}"
    
    galaxy_version=$(git describe --tags | sed -e "s/^v//")
    echo $galaxy_version | grep "-" -q || galaxy_version="${galaxy_version}"
    sed -i -e "s/version: .*/version: \"$galaxy_version\"/" galaxy.yml
    sed -i -e "s/namespace: .*/namespace: \"$namespace\"/" galaxy.yml
    sed -i -e "s/name: .*/name: \"$collection\"/" galaxy.yml
    
    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 -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 -sf ../../roles/*/library/*.py .
    })
    
    [ ! -x plugins/action_plugins ] && mkdir plugins/action_plugins
    (cd plugins/action_plugins && {
        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 "$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 "$line" \
                   "ipa" "$collection_prefix"
        done
    echo -e "\033[AFixing examples in roles/*/library... \033[32;1mDONE\033[0m"
    
    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 "$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 "$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 "$line" "ipa" "$collection_prefix"
        done
    echo -e "\033[AFixing playbooks in tests... \033[32;1mDONE\033[0m"
    
    #git diff
    
    ansible-galaxy collection build
    
    rm plugins/module_utils/ansible_ipa_*
    rm plugins/modules/ipaserver_*
    rm plugins/modules/ipareplica_*
    rm plugins/modules/ipaclient_*
    rm plugins/action_plugins/ipaclient_*
    git reset --hard