{"id":18760155,"url":"https://github.com/cdelgehier/sharepoint-ansible-module","last_synced_at":"2025-04-13T03:30:59.101Z","repository":{"id":62425997,"uuid":"559684178","full_name":"cdelgehier/sharepoint-ansible-module","owner":"cdelgehier","description":"Ansible module to push or fetch in sharepoint","archived":false,"fork":false,"pushed_at":"2023-09-22T12:08:16.000Z","size":26,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T20:55:44.922Z","etag":null,"topics":["ansible","module","sharepoint","sharepoint-online","teams"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdelgehier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-30T21:18:43.000Z","updated_at":"2024-11-14T19:57:42.000Z","dependencies_parsed_at":"2023-01-23T11:30:20.077Z","dependency_job_id":null,"html_url":"https://github.com/cdelgehier/sharepoint-ansible-module","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdelgehier%2Fsharepoint-ansible-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdelgehier%2Fsharepoint-ansible-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdelgehier%2Fsharepoint-ansible-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdelgehier%2Fsharepoint-ansible-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdelgehier","download_url":"https://codeload.github.com/cdelgehier/sharepoint-ansible-module/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248659606,"owners_count":21141146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","module","sharepoint","sharepoint-online","teams"],"created_at":"2024-11-07T18:10:02.789Z","updated_at":"2025-04-13T03:30:58.815Z","avatar_url":"https://github.com/cdelgehier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n# Ansible Collection - cdelgehier.sharepoint\n\nThis collection embeds a module allowing to manage basic actions with a tool like sharepoint.\n\n## Requirements\n\nThe goal was to make a fairly low dependency module.\nThe only dependencies are:\n- requests\n- json\n- os\n\n## Module Variables\n\nIf an essential variable is missing, the module will try to look in the execution environment.\n\nTo define them just export them in the shell.\n\n```shell\nexport SHAREPOINT_CLIENT_ID='1fd2d8ee-ab64-4ea7-91ff-4ff0eeaea745@8762bcf7-08b4-4439-b003-b37c748b5be4'\n```\n```shell\nexport SHAREPOINT_CLIENT_SECRET='/5D97FFE09CE34047B691A5C2E8AFC896='\n```\n```shell\nexport SHAREPOINT_TENANT_NAME='mycompany'\n```\n```shell\nexport SHAREPOINT_TENANT_ID='8613c317-2809-4c99-acf4-8bca8c4daffa'\n```\n```shell\nexport SHAREPOINT_SITE_NAME='mydepartment'\n```\n\n## Usage\n\nThe use of environment variables greatly simplifies the writing of tasks but it is possible to specify these variables in each task.\n\n\n### Push a file to a folder\n```yaml\n- name: \"Push file to test folder\"\n  sharepoint:\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    local_file_path: /Users/cedricd\n    local_file_name: test.txt\n    remote_file_path: \"{{ remote_file_path }}\"\n```\n\n### Get a file from a folder\n```yaml\n- name: \"Get file from sharepoint\"\n  sharepoint:\n    method : get\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    remote_file_path: \"{{ remote_file_path }}\"\n    remote_file_name: test.txt\n    local_file_path: /Users/cedricd\n    local_file_name: another_test.txt\n```\n\n### Delete a file in a folder\n```yaml\n- name: \"Delete file in sharepoint\"\n  sharepoint:\n    method : delete\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    remote_file_path: \"{{ remote_file_path }}\"\n    remote_file_name: test.txt\n```\n\n### List the contents of a folder\n```yaml\n- name: \"List the contents of a folderr\"\n  sharepoint:\n    method : list\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    remote_file_path: \"{{ remote_file_path }}\"\n```\n\n### Create folder in sharepoint\n```yaml\n- name: \"Create folder in sharepoint\"\n  sharepoint:\n    method : mkdir\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    remote_file_path: \"{{ remote_file_path }}/plop\"\n```\n\n### Delete folder in sharepoint\n```yaml\n- name: \"Remove folder in sharepoint\"\n  sharepoint:\n    method : rmdir\n    client_id: \"{{ client_id }}\"\n    client_secret: \"{{ client_secret }}\"\n    tenant_name: \"{{ tenant_name }}\"\n    tenant_id: \"{{ tenant_id }}\"\n    site_name: \"{{ site_name }}\"\n\n    remote_file_path: \"{{ remote_file_path }}/plop\"\n```\n\n## Changelog\n\nSee changelog.\n\n## License\n\nGNU GENERAL PUBLIC LICENSE v3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdelgehier%2Fsharepoint-ansible-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdelgehier%2Fsharepoint-ansible-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdelgehier%2Fsharepoint-ansible-module/lists"}