Skip to content

Commit 491c7d6

Browse files
authored
Merge pull request #1 from ccdc-opensource/update_role_names
Update role names
2 parents 956e3f7 + 0b65434 commit 491c7d6

11 files changed

+158
-28
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.yml]
14+
indent_style = space
15+
indent_size = 2

.github/workflows/common_ccdc_status_checks.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# This status check is updated on all repositories by the moan.py script
23
# in the github-repository-management repository.
34
# Changes in this file will be overwritten periodically.
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Lint
3+
4+
on: [pull_request]
5+
6+
jobs:
7+
lint:
8+
name: Linting
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.9
18+
architecture: x64
19+
20+
- name: Checkout
21+
uses: actions/checkout@main
22+
23+
- name: Install linters
24+
run: pip install ansible ansible-lint yamllint
25+
26+
- name: Run ansible-lint
27+
run: "ansible-lint ."
28+
29+
- name: Run yamllint
30+
run: "yamllint ."

.yamllint.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# -*- mode: yaml -*-
2+
# vim:ts=2:sw=2:ai:si:syntax=yaml
3+
#
4+
# yamllint configuration directives
5+
# Project Homepage: https://github.com/adrienverge/yamllint
6+
#
7+
# Overriding rules in files:
8+
# http://yamllint.readthedocs.io/en/latest/disable_with_comments.html
9+
---
10+
extends: default
11+
12+
# Rules documentation: http://yamllint.readthedocs.io/en/latest/rules.html
13+
rules:
14+
braces:
15+
# Defaults
16+
# min-spaces-inside: 0
17+
# max-spaces-inside: 0
18+
19+
# Keeping 0 min-spaces to not error on empty collection definitions
20+
min-spaces-inside: 0
21+
# Allowing one space inside braces to improve code readability
22+
max-spaces-inside: 1
23+
24+
brackets:
25+
# Defaults
26+
# min-spaces-inside: 0
27+
# max-spaces-inside: 0
28+
29+
# Keeping 0 min-spaces to not error on empty collection definitions
30+
min-spaces-inside: 0
31+
# Allowing one space inside braces to improve code readability
32+
max-spaces-inside: 1
33+
34+
comments:
35+
# Defaults
36+
# level: warning
37+
# require-starting-space: true
38+
39+
# Disabling to allow for code comment blocks and #!/usr/bin/ansible-playbook
40+
require-starting-space: false
41+
min-spaces-from-content: 1
42+
43+
indentation:
44+
# Defaults
45+
# spaces: consistent
46+
# indent-sequences: true
47+
# check-multi-line-strings: false
48+
49+
# Requiring 2 space indentation
50+
spaces: 2
51+
# Requiring consistent indentation within a file, either indented or not
52+
indent-sequences: consistent
53+
54+
# Disabling due to copious amounts of long lines in the code which would
55+
# require a code style change to resolve
56+
line-length:
57+
# Defaults
58+
max: 160
59+
60+
# Disabling due to become: true being used pervasively in roles
61+
truthy: disable

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 The Cambridge Crystallographic Data Centre (Open Source)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

meta/main.yml

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
---
2-
dependencies: []
3-
4-
galaxy_info:
5-
author: cbantaloukas@ccdc.cam.ac.uk
6-
description: Configuration for CCDC macOS build machines.
7-
company: "CCDC"
8-
license: "license (BSD, MIT)"
9-
min_ansible_version: 2.9
10-
platforms:
11-
- name: Darwin
12-
versions:
13-
- all
14-
galaxy_tags:
15-
- system
16-
2+
dependencies: []
3+
4+
galaxy_info:
5+
role_name: cpp_build_machine_macos_configuration
6+
namespace: ccdc
7+
author: rockdreamer
8+
description: Configuration for CCDC MacOS build machines.
9+
company: The Cambridge Crystallographic Data Centre
10+
license: "license (BSD, MIT)"
11+
min_ansible_version: 2.9
12+
platforms:
13+
- name: MacOSX
14+
versions:
15+
- all
16+
galaxy_tags:
17+
- system

requirements.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
---
2-
- src: https://github.com/feffi/ansible-macos-standby.git
3-
name: feffi.macos-standby
2+
- src: https://github.com/feffi/ansible-macos-standby.git
3+
name: feffi.macos-standby
4+
- src: https://github.com/feffi/ansible-macos-defaults.git
5+
name: feffi.macos-defaults

tasks/defaults-for-build-machine-speed.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
- Restart Finder
6161

6262
- name: show info in login screen
63-
become: yes
63+
become: true
6464
osx_defaults:
6565
domain: /Library/Preferences/com.apple.loginwindow
6666
key: AdminHostInfo

tasks/disable-autoupdates.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
- name: Disable automatic updates
33
command: softwareupdate --schedule off
44
changed_when: false
5-
become: true
5+
become: true

tasks/disable-spotlight.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
- name: Disable constant indexing by spotlight
2+
- name: Disable constant indexing by spotlight # noqa: no-changed-when
33
command: mdutil -i off /
4-
ignore_errors: true
4+
ignore_errors: true # noqa: ignore-errors
55
become: true
66

7-
- name: kill all spotlight indexers
7+
- name: kill all spotlight indexers # noqa: no-changed-when
88
command: killall mds
9-
ignore_errors: true
9+
ignore_errors: true # noqa: ignore-errors
1010
become: true
1111

12-
- name: rebuild spotlight index
12+
- name: rebuild spotlight index # noqa: no-changed-when
1313
command: mdutil -E
14-
ignore_errors: true
14+
ignore_errors: true # noqa: ignore-errors
1515
become: true
1616

17-
- name: Disable constant indexing by spotlight
17+
- name: Disable constant indexing by spotlight # noqa: no-changed-when
1818
command: mdutil -i off /
19-
ignore_errors: true
19+
ignore_errors: true # noqa: ignore-errors
2020
become: true

tasks/never-sleep.yml

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@
1616
standby_delay: false
1717
hibernate_mode: 0
1818
remove_sleepimage: true
19-

0 commit comments

Comments
 (0)