Skip to content

Commit f40a251

Browse files
committed
Update yml files after linting (NO_JIRA)
1 parent 5a90814 commit f40a251

File tree

8 files changed

+33
-29
lines changed

8 files changed

+33
-29
lines changed

meta/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ galaxy_info:
88
description: C++ compiler deployment and setup for CCDC build machines.
99
company: The Cambridge Crystallographic Data Centre
1010
license: "license (BSD, MIT)"
11-
min_ansible_version: 2.9
11+
min_ansible_version: "2.9"
1212
platforms:
1313
- name: EL
1414
versions:
@@ -21,7 +21,7 @@ galaxy_info:
2121
- all
2222
- name: MacOSX
2323
versions:
24-
- 10.15
24+
- all
2525
- name: Windows
2626
versions:
2727
- all

tasks/CentOS.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Install build tools
3-
yum:
3+
ansible.builtin.yum:
44
name:
55
- devtoolset-10
66
- llvm-toolset-10.0
@@ -12,14 +12,14 @@
1212

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

2121
- name: Enable llvm-toolset globally for all users
22-
copy:
22+
ansible.builtin.copy:
2323
src: enable-llvm-toolset.sh
2424
dest: /etc/profile.d/enable-llvm-toolset.sh
2525
mode: u=rwx,g=rx,o=rx

tasks/Darwin.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
- name: Check for existing Xcode installation
3-
stat:
3+
ansible.builtin.stat:
44
path: "/Applications/Xcode_{{ xcode_version }}.app"
55
register: xcode_app
66

77
- name: "Download XCode {{ xcode_version }}"
8-
shell: >
8+
ansible.builtin.shell: >
99
jfrog rt dl
1010
--flat
1111
--fail-no-op
@@ -21,45 +21,49 @@
2121
JFROG_CLI_OFFER_CONFIG: "false"
2222
when: xcode_app.stat.isdir is not defined or not xcode_app.stat.isdir
2323
register: download
24+
args:
25+
creates: "~/Downloads/Xcode_{{ xcode_version }}.xip"
2426

2527
- name: Extract XCode archive
26-
command: xip -x ~/Downloads/Xcode_{{ xcode_version }}.xip
28+
ansible.builtin.command: xip -x ~/Downloads/Xcode_{{ xcode_version }}.xip
2729
args:
2830
chdir: "/Applications"
2931
creates: "/Applications/Xcode.app"
3032
when: xcode_app.stat.isdir is not defined or not xcode_app.stat.isdir
3133
register: extract_xcode_xip
3234

33-
- name: Move XCode to /Applications/Xcode_{{ xcode_version }}.app
34-
command: mv /Applications/Xcode.app /Applications/Xcode_{{ xcode_version }}.app
35+
- name: Move XCode to /Applications/Xcode_{{ xcode_version }}.app # noqa: name[template]
36+
ansible.builtin.command: mv /Applications/Xcode.app /Applications/Xcode_{{ xcode_version }}.app
3537
when: xcode_app.stat.isdir is not defined or not xcode_app.stat.isdir
38+
args:
39+
creates: "/Applications/Xcode_{{ xcode_version }}.app"
3640

3741
- name: Remove downloaded Xcode archive
38-
file:
42+
ansible.builtin.file:
3943
state: absent
4044
path: "~/Downloads/Xcode_{{ xcode_version }}.xip"
4145

42-
- name: switch to /Applications/Xcode_{{ xcode_version }}.app # noqa: no-changed-when
43-
command: xcode-select --switch /Applications/Xcode_{{ xcode_version }}.app/Contents/Developer
46+
- name: Switch to /Applications/Xcode_{{ xcode_version }}.app # noqa: no-changed-when name[template]
47+
ansible.builtin.command: xcode-select --switch /Applications/Xcode_{{ xcode_version }}.app/Contents/Developer
4448
become: true
4549

4650
- name: Accept Xcode licence # noqa: no-changed-when
47-
command: xcodebuild -license accept
51+
ansible.builtin.command: xcodebuild -license accept
4852
become: true
4953

5054
- name: Get list of installed packages # noqa: no-changed-when
51-
command: pkgutil --pkgs
55+
ansible.builtin.command: pkgutil --pkgs
5256
register: pkgutil_packages
5357

5458
- name: Get list of packages available with Xcode
55-
find:
59+
ansible.builtin.find:
5660
path: /Applications/Xcode_{{ xcode_version }}.app/Contents/Resources/Packages/
5761
patterns: "*.pkg"
5862
recurse: no
5963
register: packages
6064

61-
- name: Install Xcode packages
62-
include: install-pkg.yml
65+
- name: Install Xcode packages # noqa: deprecated-module
66+
ansible.builtin.include: install-pkg.yml
6367
vars:
6468
package_file: "{{ package }}"
6569
package_list: "{{ pkgutil_packages.stdout }}"

tasks/Debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Install build tools
3-
apt:
3+
ansible.builtin.apt:
44
name:
55
- build-essential
66
state: present

tasks/RedHat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

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

2121
- name: Enable llvm-toolset globally for all users
22-
copy:
22+
ansible.builtin.copy:
2323
src: enable-llvm-toolset.sh
2424
dest: /etc/profile.d/enable-llvm-toolset.sh
2525
mode: u=rwx,g=rx,o=rx

tasks/Windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
- name: Install visualstudio2019professional (SLOW)
3-
win_chocolatey:
3+
chocolatey.chocolatey.win_chocolatey:
44
name: visualstudio2019professional
55
state: present
66

77
- name: Install visualstudio2019-workload-nativedesktop (SLOW)
8-
win_chocolatey:
8+
chocolatey.chocolatey.win_chocolatey:
99
name: visualstudio2019-workload-nativedesktop
1010
state: present
1111

1212
- name: Install visualstudio2019-remotetools
13-
win_chocolatey:
13+
chocolatey.chocolatey.win_chocolatey:
1414
name: visualstudio2019-remotetools
1515
state: present

tasks/install-pkg.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
- name: read package info # noqa: no-changed-when
3-
command: installer -pkginfo -pkg "{{ package_file }}"
2+
- name: Read package info # noqa: no-changed-when
3+
ansible.builtin.command: installer -pkginfo -pkg "{{ package_file }}"
44
register: package_pkginfo
55

6-
- name: install package
7-
command: installer -pkg "{{ package_file }}" -target /
6+
- name: Install package # noqa: no-changed-when
7+
ansible.builtin.command: installer -pkg "{{ package_file }}" -target /
88
when: package_pkginfo.stdout not in package_list
99
become: true

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Set up C++ compilers
3-
include_tasks: "{{ taskfile }}"
3+
ansible.builtin.include_tasks: "{{ taskfile }}"
44
with_first_found:
55
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
66
- "{{ ansible_distribution }}.yml"

0 commit comments

Comments
 (0)