Creation of `microsoft.iis` Ansible Collection

Hi everyone,

TL;DR
As part of our ongoing work on supported Ansible Collections, we need to create a new collection named microsoft.iis to house Microsoft Internet Information Services (IIS) modules.


My name is Hen, and I’m part of the Red Hat team responsible for developing and maintaining supported Ansible Collections. Currently, we are migrating content from the community.windows repository into supported collections. This effort has already resulted in the creation of:

  1. ansible.windows
  2. microsoft.ad

The next step in the project is to create the microsoft.iis collection, which will focus specifically on IIS modules. Many of these modules already exist in the community.windows repository and will need to be reviewed, verified, and promoted to the new collection as supported content.

Could someone assist with the process of opening a new repository for this collection under the Ansible Collections organization?

Thank you,
Hen

@Yaish25491 We can help with this.

What’s your GitHub id?

I’ll find the instructions to move the git files and keep history, which is important.

Hi,
Thanks for the quick response!
Github id is the same, Yaish25491.

Just to be clear, The project should start empty with the ansible template.
We will start promoting modules from the community once the project is up and we finish creating a working CI.

Thanks.

You’re probably aware of this already since this is the third collection y’all are creating from community.windows but just in case - here are the instructions for migrating content out of a collection.

@Yaish25491 As we want to maintain history, I’ve created an empty repo microsoft.iis and given you write access.

  1. Accept the invite to join the repo

  2. Please use these instructions to copy the files from community.windows which will maintain history

Merging unrelated histories

Clone the new repository and add the source as a remote.

git clone git@github.com:org/new-repo.git
git remote add source-repo git@github.com:org/source-repo.git

Confirm that the source is a remote.

git remote -v
origin git@github.com:org/new-repo.git (fetch)
origin git@github.com:org/new-repo.git (push)
source-repo git@github.com:org/source-repo.git (fetch)
source-repo git@github.com:org/source-repo.git (push)

View the history of the new repository.

You should see the initial commit and any subsequent commits as you’d expect.

git log

Fetch the content of the source repository.

git fetch source-repo

Merge the main or devel branch of the source repository into the new repository.

git merge source-repo/main --allow-unrelated-histories

If you encounter any conflicts you’ll need to fix them and then continue the merge.

git merge --continue

At this point the new repository should contain the contributor history from the source repository.

Viewing the history again should show the merge commit on top, the initial commit, and then the commit history.

git log

You can view the history of individual files or directories.

git log --follow path/to/directory_or_file

Move and delete files that were merged from the source repository as needed.

git mv path/to/directory_or_file
git rm -rf directory
git commit

Push the changes to the new repository.

git push origin HEAD:main

  1. Reply to this forum post and ask me to setup GitHub branch protections

  2. Once you have the files copied across follow the instructions for migrating content out of a collection.

  3. Copy/update your new repo from the collection_template

  4. Get CI green

I realize there is a lot involved in this, so please use this forum thread if you’ve got questions.

1 Like

@gundalow
Thanks a lot!
I will follow your instructions in order to maintain the history, and post question here if needed.

Thanks, Hen.

1 Like