From ffb91dc08e45df01f8c322fc2ce640583e104bb0 Mon Sep 17 00:00:00 2001 From: "ansible-code-bot[bot]" <146274539+ansible-code-bot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:02:06 +0000 Subject: [PATCH] Fix ansible-lint rule violations --- playbooks/cloud/aws/inventory/group_vars/all.yml | 2 +- playbooks/cloud/aws/prepare_aws_environment.yml | 14 +++++++------- playbooks/cloud/aws/vars/ec2_instance.yml | 2 +- playbooks/cloud/azure/inventory/group_vars/all.yml | 2 +- .../cloud/azure/prepare_azure_environment.yml | 12 ++++++------ .../cloud/azure/solution_provision_azure_vm.yml | 6 +++--- .../install_cockpit/solution_install_cockpit.yml | 2 +- tests/playbooks/install_cockpit.yml | 2 +- tests/playbooks/install_web_and_db.yml | 2 +- tests/playbooks/provision_azure_vm.yml | 6 +++--- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/playbooks/cloud/aws/inventory/group_vars/all.yml b/playbooks/cloud/aws/inventory/group_vars/all.yml index 851f3c3..cd16c2d 100644 --- a/playbooks/cloud/aws/inventory/group_vars/all.yml +++ b/playbooks/cloud/aws/inventory/group_vars/all.yml @@ -1,5 +1,5 @@ --- ansible_user: ec2-user ansible_python_interpreter: /usr/bin/python3 -ansible_ssh_extra_args: '-o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=60s' +ansible_ssh_extra_args: -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=60s ansible_ssh_pipelining: true diff --git a/playbooks/cloud/aws/prepare_aws_environment.yml b/playbooks/cloud/aws/prepare_aws_environment.yml index c1a5604..298303e 100644 --- a/playbooks/cloud/aws/prepare_aws_environment.yml +++ b/playbooks/cloud/aws/prepare_aws_environment.yml @@ -36,14 +36,14 @@ ansible.builtin.file: path: files state: directory - mode: '0755' + mode: "0755" when: __instruqt_ssh_key.stat.exists - name: Copy instruqt_lab key to files folder ansible.builtin.copy: src: ~/.ssh/instruqt_lab dest: files/aws_demo_ssh_key - mode: '0600' + mode: "0600" when: __instruqt_ssh_key.stat.exists - name: Create key pair called lightspeed-keypair @@ -78,7 +78,7 @@ - proto: tcp ports: - 22 - cidr_ip: 0.0.0.0/0 + cidr_ip: "0.0.0.0/0" rule_desc: allow all on ssh port register: secgroup_lightspeed @@ -107,18 +107,18 @@ subnets: - "{{ subnet.subnet.id }}" routes: - - dest: 0.0.0.0/0 + - dest: "0.0.0.0/0" gateway_id: "{{ igw.gateway_id }}" handlers: - name: Save private key file ansible.builtin.copy: content: "{{ ec2_key.key.private_key }}" - dest: "files/lightspeed-keypair.pem" - mode: '0600' + dest: files/lightspeed-keypair.pem + mode: "0600" - name: Create files folder ansible.builtin.file: state: directory path: files - mode: '0755' + mode: "0755" diff --git a/playbooks/cloud/aws/vars/ec2_instance.yml b/playbooks/cloud/aws/vars/ec2_instance.yml index 8caf0dd..df6231c 100644 --- a/playbooks/cloud/aws/vars/ec2_instance.yml +++ b/playbooks/cloud/aws/vars/ec2_instance.yml @@ -6,4 +6,4 @@ ec2_instance: wait: true tags: function: lightspeed-demo - security_group: secgroup-lightspeed \ No newline at end of file + security_group: secgroup-lightspeed diff --git a/playbooks/cloud/azure/inventory/group_vars/all.yml b/playbooks/cloud/azure/inventory/group_vars/all.yml index 5c2ba35..0bd7e36 100644 --- a/playbooks/cloud/azure/inventory/group_vars/all.yml +++ b/playbooks/cloud/azure/inventory/group_vars/all.yml @@ -1,5 +1,5 @@ --- ansible_user: rhel ansible_python_interpreter: /usr/bin/python3 -ansible_ssh_extra_args: '-o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=60s' +ansible_ssh_extra_args: -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPersist=60s ansible_ssh_pipelining: true diff --git a/playbooks/cloud/azure/prepare_azure_environment.yml b/playbooks/cloud/azure/prepare_azure_environment.yml index 2d3d474..c9f9931 100644 --- a/playbooks/cloud/azure/prepare_azure_environment.yml +++ b/playbooks/cloud/azure/prepare_azure_environment.yml @@ -27,19 +27,19 @@ ansible.builtin.file: path: files state: directory - mode: '0755' + mode: "0755" when: __instruqt_ssh_key.stat.exists - name: Copy Instruqt lab SSH keys ansible.builtin.copy: - src: "~/.ssh/{{ item.name }}" - dest: "files/azure_demo_ssh_key{{ item.name | splitext | last }}" + src: ~/.ssh/{{ item.name }} + dest: files/azure_demo_ssh_key{{ item.name | splitext | last }} mode: "{{ item.mode }}" loop: - name: instruqt_lab - mode: '0600' + mode: "0600" - name: instruqt_lab.pub - mode: '0644' + mode: "0644" when: __instruqt_ssh_key.stat.exists - name: Generate local SSH keys if not Instruqt environment @@ -49,7 +49,7 @@ ansible.builtin.file: path: files state: directory - mode: '0755' + mode: "0755" - name: Generate Linux SSH key called files/azure_demo_ssh_key # noqa name[template] community.crypto.openssh_keypair: diff --git a/playbooks/cloud/azure/solution_provision_azure_vm.yml b/playbooks/cloud/azure/solution_provision_azure_vm.yml index 9c8be3b..4cfac50 100644 --- a/playbooks/cloud/azure/solution_provision_azure_vm.yml +++ b/playbooks/cloud/azure/solution_provision_azure_vm.yml @@ -22,10 +22,10 @@ admin_username: rhel tasks: - # # 1. Uncomment this task description. + # # 1. Uncomment this task description. # - name: Create a Standard_A1_v2 RHEL 8 VM called vm-lightspeed - # # 2. Remove previous task description and suggestion and uncomment the "vars:" section. - # # 3. Generate a new task using the below task description. + # # 2. Remove previous task description and suggestion and uncomment the "vars:" section. + # # 3. Generate a new task using the below task description. - name: Create a VM called vm-lightspeed using vm_config var azure.azcollection.azure_rm_virtualmachine: resource_group: "{{ vm_config.resource_group }}" diff --git a/playbooks/infra/install_cockpit/solution_install_cockpit.yml b/playbooks/infra/install_cockpit/solution_install_cockpit.yml index f9f34b0..257033a 100644 --- a/playbooks/infra/install_cockpit/solution_install_cockpit.yml +++ b/playbooks/infra/install_cockpit/solution_install_cockpit.yml @@ -20,7 +20,7 @@ dest: /etc/cockpit/cockpit.conf owner: root group: root - mode: '0644' + mode: "0644" - name: Start and enable service ansible.builtin.service: diff --git a/tests/playbooks/install_cockpit.yml b/tests/playbooks/install_cockpit.yml index f9f34b0..257033a 100644 --- a/tests/playbooks/install_cockpit.yml +++ b/tests/playbooks/install_cockpit.yml @@ -20,7 +20,7 @@ dest: /etc/cockpit/cockpit.conf owner: root group: root - mode: '0644' + mode: "0644" - name: Start and enable service ansible.builtin.service: diff --git a/tests/playbooks/install_web_and_db.yml b/tests/playbooks/install_web_and_db.yml index 9e71612..5f6c220 100644 --- a/tests/playbooks/install_web_and_db.yml +++ b/tests/playbooks/install_web_and_db.yml @@ -15,7 +15,7 @@ dest: /etc/httpd/conf/httpd.conf owner: root group: root - mode: '0644' + mode: "0644" - name: Start and enable httpd service ansible.builtin.service: diff --git a/tests/playbooks/provision_azure_vm.yml b/tests/playbooks/provision_azure_vm.yml index 9c8be3b..4cfac50 100644 --- a/tests/playbooks/provision_azure_vm.yml +++ b/tests/playbooks/provision_azure_vm.yml @@ -22,10 +22,10 @@ admin_username: rhel tasks: - # # 1. Uncomment this task description. + # # 1. Uncomment this task description. # - name: Create a Standard_A1_v2 RHEL 8 VM called vm-lightspeed - # # 2. Remove previous task description and suggestion and uncomment the "vars:" section. - # # 3. Generate a new task using the below task description. + # # 2. Remove previous task description and suggestion and uncomment the "vars:" section. + # # 3. Generate a new task using the below task description. - name: Create a VM called vm-lightspeed using vm_config var azure.azcollection.azure_rm_virtualmachine: resource_group: "{{ vm_config.resource_group }}"