Skip to content

Commit 4f00456

Browse files
author
Claudio Bantaloukas
authored
Merge pull request #1 from ccdc-opensource/update_role_names
Update role names
2 parents 6bedba6 + e2761ae commit 4f00456

File tree

12 files changed

+152
-32
lines changed

12 files changed

+152
-32
lines changed

.editorconfig

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
14
root = true
25

36
[*]
47
indent_style = space
5-
indent_size = 2
6-
charset = utf-8
8+
indent_size = 4
9+
end_of_line = lf
10+
insert_final_newline = true
711
trim_trailing_whitespace = true
8-
insert_final_newline = true
12+
13+
[*.yml]
14+
indent_style = space
15+
indent_size = 2

.github/workflows/common_ccdc_status_checks.yml

Lines changed: 1 addition & 0 deletions
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.
Lines changed: 30 additions & 0 deletions
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

Lines changed: 61 additions & 0 deletions
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

Lines changed: 21 additions & 0 deletions
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.

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,17 @@ Applying this role will set up appropriate C++ compilers and base system require
66

77
### Linux
88

9-
- devtoolset-8 (CentOS)
10-
- build-essential (Debian)
11-
9+
- devtoolset-10 (CentOS)
10+
- build-essential (Debian)
1211

1312
### macOS
1413

15-
- XCode
14+
- XCode
1615

1716
### Windows
1817

19-
- Visual Studio 2017 VC Tools
20-
- Visual Studio 2017 Remote Tools
18+
- Visual Studio 2019 VC Tools
19+
- Visual Studio 2010 Remote Tools
2120

2221
## Requirements
2322

@@ -35,12 +34,12 @@ None.
3534

3635
- hosts: all
3736
roles:
38-
- ccdc-cpp-compiler
37+
- ccdc.cpp_compiler
3938

4039
## License
4140

4241
MIT / BSD
4342

4443
## Author Information
4544

46-
This role was created in 2020 by Claudio Bantaloukas, based on existing roles at CCDC, by Jeff Geerling and google searches
45+
This role was created in 2020 by Claudio Bantaloukas, based on existing roles at CCDC, by Jeff Geerling and google searches

files/enable-llvm-toolset.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
source scl_source enable llvm-toolset-10.0
1+
source scl_source enable llvm-toolset-10.0

meta/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,26 @@
22
dependencies: []
33

44
galaxy_info:
5-
author: cbantaloukas@ccdc.cam.ac.uk
5+
role_name: cpp_compiler
6+
namespace: ccdc
7+
author: rockdreamer
68
description: C++ compiler deployment and setup for CCDC build machines.
7-
company: "CCDC"
9+
company: The Cambridge Crystallographic Data Centre
810
license: "license (BSD, MIT)"
911
min_ansible_version: 2.9
1012
platforms:
1113
- name: EL
1214
versions:
1315
- all
14-
- name: Fedora
15-
versions:
16-
- all
1716
- name: Debian
1817
versions:
1918
- all
2019
- name: Ubuntu
2120
versions:
2221
- all
23-
- name: Darwin
22+
- name: MacOSX
2423
versions:
25-
- all
24+
- 10.15
2625
- name: Windows
2726
versions:
2827
- all

tasks/CentOS.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
- llvm-toolset-10.0
77
- llvm-toolset-10.0-git-clang-format
88
- llvm-toolset-10.0-clang-tools-extra
9-
state: latest
9+
state: present
1010
use_backend: yum
11-
become: yes
11+
become: true
1212

1313
- name: Enable devtoolset globally for all users
1414
# See https://developers.redhat.com/blog/2014/03/19/permanently-enable-a-software-collection/
1515
copy:
1616
src: enable-devtoolset.sh
1717
dest: /etc/profile.d/enable-devtoolset.sh
18-
become: yes
18+
mode: u=rwx,g=rx,o=rx
19+
become: true
1920

2021
- name: Enable llvm-toolset globally for all users
2122
copy:
2223
src: enable-llvm-toolset.sh
2324
dest: /etc/profile.d/enable-llvm-toolset.sh
24-
become: yes
25+
mode: u=rwx,g=rx,o=rx
26+
become: true

tasks/Darwin.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- name: "Download XCode {{ xcode_version }}"
88
shell: >
9-
jfrog rt dl
9+
jfrog rt dl
1010
--flat
1111
--fail-no-op
1212
--retries=100
@@ -38,23 +38,23 @@
3838
file:
3939
state: absent
4040
path: "~/Downloads/Xcode_{{ xcode_version }}.xip"
41-
42-
- name: switch to /Applications/Xcode_{{ xcode_version }}.app
41+
42+
- name: switch to /Applications/Xcode_{{ xcode_version }}.app # noqa: no-changed-when
4343
command: xcode-select --switch /Applications/Xcode_{{ xcode_version }}.app/Contents/Developer
4444
become: true
4545

46-
- name: Accept Xcode licence
46+
- name: Accept Xcode licence # noqa: no-changed-when
4747
command: xcodebuild -license accept
4848
become: true
4949

50-
- name: Get list of installed packages
50+
- name: Get list of installed packages # noqa: no-changed-when
5151
command: pkgutil --pkgs
5252
register: pkgutil_packages
5353

5454
- name: Get list of packages available with Xcode
5555
find:
5656
path: /Applications/Xcode_{{ xcode_version }}.app/Contents/Resources/Packages/
57-
patterns: '*.pkg'
57+
patterns: "*.pkg"
5858
recurse: no
5959
register: packages
6060

0 commit comments

Comments
 (0)