Skip to content

Commit

Permalink
Version 0.0.1
Browse files Browse the repository at this point in the history
inital develop
  • Loading branch information
sbaerlocher authored Mar 8, 2020
2 parents ce47c19 + 29b153c commit 28e923d
Show file tree
Hide file tree
Showing 70 changed files with 1,405 additions and 95 deletions.
46 changes: 23 additions & 23 deletions .github/auto_assign.yml
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
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
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 }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ and [human-readable changelog](https://keepachangelog.com/en/1.0.0/).

## master

## 0.0.1

### Added

- Initial develop
- Initial docs
33 changes: 25 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
target: '#docute',
title: 'Ansible Collection for Windows functions',
sourcePath:
'https://raw.githubusercontent.com/sbaerlocher/ansible.windows',
'https://raw.githubusercontent.com/sbaerlocher/ansible.windows/master',

// router: { mode: 'history' },
nav: [
{
Expand Down Expand Up @@ -51,29 +52,45 @@
{
title: 'Roles',
children: [
{
title: 'Defender',
link: '/roles/defender/README'
},
{
title: 'Directories',
link: '/roles/directories'
link: '/roles/directories/README'
},
{
title: 'Disks',
link: '/roles/disks'
link: '/roles/disks/README'
},
{
title: 'Local_Administrators',
link: '/roles/local_administrators'
title: 'Local Administrators',
link: '/roles/local_administrators/README'
},
{
title: 'Membership',
link: '/roles/membership'
link: '/roles/membership/README'
},
{
title: 'OneDrive',
link: '/roles/onedrive'
link: '/roles/onedrive/README'
},
{
title: 'Optional Features',
link: '/roles/optional_features/README'
},
{
title: 'Power Plan',
link: '/roles/power_plan/README'
},
{
title: 'Remote Desktop',
link: '/roles/remote_desktop'
link: '/roles/remote_desktop/README'
},
{
title: 'Startlayout',
link: '/roles/startlayout/README'
}
]
}
Expand Down
40 changes: 1 addition & 39 deletions galaxy.yml
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'
31 changes: 31 additions & 0 deletions plugins/README.md
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).
25 changes: 25 additions & 0 deletions roles/defender/README.md
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
```
5 changes: 5 additions & 0 deletions roles/defender/defaults/main.yml
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
16 changes: 16 additions & 0 deletions roles/defender/meta/main.yml
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: []
21 changes: 21 additions & 0 deletions roles/defender/molecule/default/molecule.yml
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
5 changes: 5 additions & 0 deletions roles/defender/molecule/default/playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Converge
hosts: all
roles:
- role: sbaerlocher.windows.defender
5 changes: 5 additions & 0 deletions roles/defender/tasks/main.yml
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 }}'
15 changes: 15 additions & 0 deletions roles/directories/defaults/main.yml
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
16 changes: 16 additions & 0 deletions roles/directories/meta/main.yml
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: []
21 changes: 21 additions & 0 deletions roles/directories/molecule/default/molecule.yml
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
5 changes: 5 additions & 0 deletions roles/directories/molecule/default/playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Converge
hosts: all
roles:
- role: sbaerlocher.windows.directories
17 changes: 17 additions & 0 deletions roles/directories/tasks/directories.yml
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
Loading

0 comments on commit 28e923d

Please sign in to comment.