From: Thanh Ha Date: Wed, 10 Jul 2019 02:25:56 +0000 (-0400) Subject: Reformat JSON and YAML files with prettier X-Git-Tag: v0.4.0~11^2~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=4c5c950ca1ad97e9aab703cb5db8f6def04901b8;p=releng%2Fcommon-packer.git Reformat JSON and YAML files with prettier See I2655382ba6fb099970418475ad4cf939b11752e5 for implementation details. Signed-off-by: Thanh Ha Change-Id: I88c7cd50a03f8816bb78ff54dcf574bb65276794 --- diff --git a/provision/baseline.yaml b/provision/baseline.yaml index 746d582..4108710 100644 --- a/provision/baseline.yaml +++ b/provision/baseline.yaml @@ -7,10 +7,10 @@ - include_role: name=lfit.system-update - name: Install base packages - include_tasks: '{{item}}' + include_tasks: "{{item}}" with_first_found: - - 'install-base-pkgs-{{ansible_distribution}}.yaml' - - 'install-base-pkgs-{{ansible_os_family}}.yaml' + - "install-base-pkgs-{{ansible_distribution}}.yaml" + - "install-base-pkgs-{{ansible_os_family}}.yaml" - name: Allow jenkins user sudo access copy: @@ -48,17 +48,17 @@ - name: Set all periodic update options to 0 replace: path: /etc/apt/apt.conf.d/10periodic - regexp: '1' - replace: '0' + regexp: "1" + replace: "0" - name: Set all auto update options to 0 replace: path: /etc/apt/apt.conf.d/20auto-upgrades - regexp: '1' - replace: '0' + regexp: "1" + replace: "0" - name: Disable unattended upgrades lineinfile: path: /etc/apt/apt.conf.d/10periodic - regexp: '^APT::Periodic::Unattended-Upgrade' + regexp: "^APT::Periodic::Unattended-Upgrade" line: 'APT::Periodic::Unattended-Upgrade "0";' create: yes - name: Uninstall unattended upgrades @@ -71,7 +71,7 @@ selection: hold - name: Disable apt-daily.* systemd services systemd: - name: '{{service}}' + name: "{{service}}" enabled: no masked: yes with_items: diff --git a/provision/docker.yaml b/provision/docker.yaml index 09e1cfa..39a7206 100644 --- a/provision/docker.yaml +++ b/provision/docker.yaml @@ -9,7 +9,7 @@ - include_role: name=lfit.system-update roles: - - {role: lfit.docker-install, mtu: 1458} + - { role: lfit.docker-install, mtu: 1458 } post_tasks: - name: System Reseal diff --git a/provision/install-base-pkgs-RedHat.yaml b/provision/install-base-pkgs-RedHat.yaml index 5d6f49d..4595d06 100644 --- a/provision/install-base-pkgs-RedHat.yaml +++ b/provision/install-base-pkgs-RedHat.yaml @@ -2,8 +2,8 @@ - name: Install base packages yum: name: - - '@base' - - '@development' + - "@base" + - "@development" - yum-utils - https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - https://centos7.iuscommunity.org/ius-release.rpm diff --git a/provision/windows-builder.yaml b/provision/windows-builder.yaml index e6bc00d..55e1a1f 100644 --- a/provision/windows-builder.yaml +++ b/provision/windows-builder.yaml @@ -1,11 +1,10 @@ --- - - hosts: all tasks: - name: Install Tools win_chocolatey: - name: '{{item}}' + name: "{{item}}" state: present with_items: - cmake @@ -33,7 +32,7 @@ - name: Install Visual Studio Community Edition win_chocolatey: - name: '{{item}}' + name: "{{item}}" with_items: - visualstudio2017community - visualstudio2017-workload-nativedesktop @@ -54,21 +53,21 @@ dest: C:\temp - name: CMake win_command: > - "C:\Program Files\CMake\Bin\cmake" - -DCMAKE_INSTALL_PREFIX=C:\lib\zlib - -G "Visual Studio 15 Win64" + "C:\Program Files\CMake\Bin\cmake" + -DCMAKE_INSTALL_PREFIX=C:\lib\zlib + -G "Visual Studio 15 Win64" args: chdir: C:\temp\zlib-1.2.11 - name: msbuild win_command: > - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild" - zlib.sln + "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild" + zlib.sln args: chdir: C:\temp\zlib-1.2.11 - name: msbuild install win_command: > - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild" - INSTALL.vcxproj + "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild" + INSTALL.vcxproj args: chdir: C:\temp\zlib-1.2.11 - name: Cleanup diff --git a/templates/builder-aws.json b/templates/builder-aws.json index 06397e4..c4a43c2 100644 --- a/templates/builder-aws.json +++ b/templates/builder-aws.json @@ -33,9 +33,7 @@ "virtualization-type": "hvm" }, "most_recent": true, - "owners": [ - "{{user `source_ami_filter_owner`}}" - ] + "owners": ["{{user `source_ami_filter_owner`}}"] }, "ssh_username": "{{user `ssh_user`}}", "ssh_proxy_host": "{{user `ssh_proxy_host`}}", @@ -48,9 +46,7 @@ "provisioners": [ { "type": "shell", - "scripts": [ - "common-packer/provision/install-python.sh" - ], + "scripts": ["common-packer/provision/install-python.sh"], "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" }, { diff --git a/templates/builder.json b/templates/builder.json index c370709..ff05f5a 100644 --- a/templates/builder.json +++ b/templates/builder.json @@ -24,9 +24,7 @@ "type": "openstack", "region": "{{user `cloud_region`}}", "availability_zone": "{{user `cloud_availability_zone`}}", - "networks": [ - "{{user `cloud_network`}}" - ], + "networks": ["{{user `cloud_network`}}"], "user_data_file": "{{user `cloud_user_data`}}", "ssh_username": "{{user `ssh_user`}}", "ssh_proxy_host": "{{user `ssh_proxy_host`}}", @@ -42,9 +40,7 @@ "provisioners": [ { "type": "shell", - "scripts": [ - "common-packer/provision/install-python.sh" - ], + "scripts": ["common-packer/provision/install-python.sh"], "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" }, { diff --git a/templates/docker.json b/templates/docker.json index 8751347..acb852e 100644 --- a/templates/docker.json +++ b/templates/docker.json @@ -24,9 +24,7 @@ "type": "openstack", "region": "{{user `cloud_region`}}", "availability_zone": "{{user `cloud_availability_zone`}}", - "networks": [ - "{{user `cloud_network`}}" - ], + "networks": ["{{user `cloud_network`}}"], "user_data_file": "{{user `cloud_user_data`}}", "ssh_username": "{{user `ssh_user`}}", "ssh_proxy_host": "{{user `ssh_proxy_host`}}", @@ -42,9 +40,7 @@ "provisioners": [ { "type": "shell", - "scripts": [ - "common-packer/provision/install-python.sh" - ], + "scripts": ["common-packer/provision/install-python.sh"], "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi" }, { diff --git a/templates/windows-builder.json b/templates/windows-builder.json index 8e6ede7..ab37b71 100644 --- a/templates/windows-builder.json +++ b/templates/windows-builder.json @@ -22,9 +22,7 @@ "type": "openstack", "region": "{{user `cloud_region`}}", "availability_zone": "{{user `cloud_availability_zone`}}", - "networks": [ - "{{user `cloud_network`}}" - ], + "networks": ["{{user `cloud_network`}}"], "user_data_file": "{{user `cloud_user_data`}}", "flavor": "{{user `flavor`}}", "metadata": {