-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
inital develop
- Loading branch information
Showing
70 changed files
with
1,405 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
--- | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: true | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- mleutenegger | ||
- FreeMinded | ||
- ndum | ||
|
||
# A number of reviewers added to the pull request | ||
# Set 0 to add all the reviewers (default: 0) | ||
numberOfReviewers: 0 | ||
# A list of assignees, overrides reviewers if set | ||
assignees: | ||
- sbaerlocher | ||
# A number of assignees to add to the pull request | ||
# Set to 0 to add all of the assignees. | ||
# Uses numberOfReviewers if unset. | ||
numberOfAssignees: 0 | ||
--- | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: true | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- mleutenegger | ||
- FreeMinded | ||
- ndum | ||
|
||
# A number of reviewers added to the pull request | ||
# Set 0 to add all the reviewers (default: 0) | ||
numberOfReviewers: 0 | ||
# A list of assignees, overrides reviewers if set | ||
assignees: | ||
- sbaerlocher | ||
# A number of assignees to add to the pull request | ||
# Set to 0 to add all of the assignees. | ||
# Uses numberOfReviewers if unset. | ||
numberOfAssignees: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Publish Collection | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Publish Ansible Collection | ||
uses: arillso/[email protected] | ||
with: | ||
api_key: ${{ secrets.GALAXY_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,18 @@ | ||
### REQUIRED | ||
|
||
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all | ||
# content lives. May only contain alphanumeric characters and underscores. Additionally namespaces cannot start with | ||
# underscores or numbers and cannot contain consecutive underscores | ||
--- | ||
namespace: 'sbaerlocher' | ||
|
||
# The name of the collection. Has the same character restrictions as 'namespace' | ||
name: 'windows' | ||
|
||
# The version of the collection. Must be compatible with semantic versioning | ||
version: 0.0.1 | ||
|
||
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection | ||
readme: README.md | ||
|
||
# A list of the collection's content authors. Can be just the name or in the format 'Full Name <email> (url) | ||
# @nicks:irc/im.site#channel' | ||
authors: | ||
- 'Simon Baerlocher (https://sbaerlocher.ch)' | ||
|
||
### OPTIONAL but strongly recommended | ||
|
||
# A short summary description of the collection | ||
description: 'Ansible Collection for Windows functions.' | ||
# Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only | ||
# accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' | ||
license: | ||
- MIT | ||
|
||
# The path to the license file for the collection. This path is relative to the root of the collection. This key is | ||
# mutually exclusive with 'license' | ||
license_file: 'LICENSE' | ||
|
||
# A list of tags you want to associate with the collection for indexing/searching. A tag name has the same character | ||
# requirements as 'namespace' and 'name' | ||
tags: | ||
- windows | ||
|
||
# Collections that this collection requires to be installed for it to be usable. The key of the dict is the | ||
# collection label 'namespace.name'. The value is a version range | ||
# L(specifiers,https://python-semanticversion.readthedocs.io/en/latest/#requirement-specification). Multiple version | ||
# range specifiers can be set and are separated by ',' | ||
dependencies: {} | ||
|
||
# The URL of the originating SCM repository | ||
repository: 'https://www.github.com/sbaerlocher/ansible.windows' | ||
|
||
# The URL to any online docs | ||
documentation: 'https://sbaerlocher.github.io/ansible.windows' | ||
|
||
# The URL to the homepage of the collection/project | ||
homepage: 'https://sbaerlocher.ch/projects/ansible.windows' | ||
|
||
# The URL to the collection issue tracker | ||
issues: 'https://www.github.com/sbaerlocher/ansible.windows/issues' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Collections Plugins Directory | ||
|
||
This directory can be used to ship various plugins inside an Ansible collection. Each plugin is placed in a folder that | ||
is named after the type of plugin it is in. It can also include the `module_utils` and `modules` directory that | ||
would contain module utils and modules respectively. | ||
|
||
Here is an example directory of the majority of plugins currently supported by Ansible: | ||
|
||
``` | ||
└── plugins | ||
├── action | ||
├── become | ||
├── cache | ||
├── callback | ||
├── cliconf | ||
├── connection | ||
├── filter | ||
├── httpapi | ||
├── inventory | ||
├── lookup | ||
├── module_utils | ||
├── modules | ||
├── netconf | ||
├── shell | ||
├── strategy | ||
├── terminal | ||
├── test | ||
└── vars | ||
``` | ||
|
||
A full list of plugin types can be found at [Working With Plugins](https://docs.ansible.com/ansible/2.9/plugins/plugins.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Ansible Role: defender | ||
|
||
## Description | ||
|
||
Disables or enables Windows defender on the Windows system. | ||
|
||
## Role Variables | ||
|
||
### defender_disable | ||
|
||
Disables or enables Windows defender on the Windows system. | ||
|
||
```yml | ||
defender_disable: true | ||
``` | ||
## Example Playbook | ||
```yml | ||
- hosts: all | ||
collections: | ||
- sbaerlocher.windows | ||
roles: | ||
- defender | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
# defaults file for defender | ||
|
||
# disables or enables Windows defender on the Windows system. | ||
defender_disable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
galaxy_info: | ||
author: Simon Baerlocher (https://sbaerlocher.ch) | ||
description: Disables or enables Windows defender on the Windows system. | ||
license: MIT | ||
min_ansible_version: 2.9 | ||
platforms: | ||
- name: Windows | ||
versions: | ||
- all | ||
|
||
galaxy_tags: | ||
- windows | ||
- defender | ||
|
||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
lint: | ||
name: yamllint | ||
platforms: | ||
- name: instance | ||
image: 'geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest' | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
scenario: | ||
name: default | ||
verifier: | ||
name: testinfra | ||
lint: | ||
name: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
roles: | ||
- role: sbaerlocher.windows.defender |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
# tasks file for defender | ||
|
||
- name: 'Disable or Enable Defender' | ||
win_shell: 'Set-MpPreference -DisableRealtimeMonitoring ${{ defender_disable }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
# defaults file for directories | ||
|
||
# With directories you can specify a list of directories | ||
# with subdirectories to be created on the target system. | ||
directories: | ||
- main: "{{ ansible_env.SystemDrive }}\\{{ directories_main }}" | ||
subdirectories: | ||
- 'facts.d' | ||
- 'xml.d' | ||
- 'tools.d' | ||
- 'ansible' | ||
|
||
# Optional root directory to be created. | ||
directories_main: Support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
galaxy_info: | ||
author: Simon Baerlocher (https://sbaerlocher.ch) | ||
description: Creates various directory structures on the target system. | ||
license: MIT | ||
min_ansible_version: 2.9 | ||
platforms: | ||
- name: Windows | ||
versions: | ||
- all | ||
|
||
galaxy_tags: | ||
- windows | ||
- directories | ||
|
||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
lint: | ||
name: yamllint | ||
platforms: | ||
- name: instance | ||
image: 'geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest' | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
privileged: true | ||
pre_build_image: true | ||
scenario: | ||
name: default | ||
verifier: | ||
name: testinfra | ||
lint: | ||
name: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
roles: | ||
- role: sbaerlocher.windows.directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
# tasks file for directories | ||
|
||
- name: 'create {{ directory.main }} directory' | ||
win_file: | ||
path: '{{ directory.main }}' | ||
state: directory | ||
tags: | ||
- configuration | ||
|
||
- name: 'include directories' | ||
include_tasks: subdirectories.yml | ||
loop: '{{ directory.subdirectories }}' | ||
loop_control: | ||
loop_var: subdirectories | ||
tags: | ||
- configuration |
Oops, something went wrong.