From 81c3357eab1f0f87353614f0ce187428a840130a Mon Sep 17 00:00:00 2001 From: "ansible-code-bot[bot]" <145416087+ansible-code-bot[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:25:32 +0000 Subject: [PATCH] Fix ansible-lint rule violations --- .ansible-lint | 1 - .yamllint | 5 ++- collections/requirements.yml | 1 - inventory/esxi.yml | 5 +-- playbooks/deploy_kasm.yml | 1 - playbooks/deploy_portainer.yml | 7 ++-- playbooks/deploy_terraform.yml | 4 +-- playbooks/deploy_vault.yml | 1 - playbooks/download_qcow2.yml | 7 ++-- playbooks/install_docker_ubuntu.yml | 1 - playbooks/install_satellite.yml | 35 +++++++++---------- playbooks/revert_aap.yml | 1 - roles/docker_ubuntu/handlers/main.yml | 1 - roles/docker_ubuntu/meta/main.yml | 15 ++++---- roles/docker_ubuntu/tasks/main.yml | 5 ++- roles/docker_ubuntu/tests/test.yml | 1 - roles/download_qcow2/defaults/main.yml | 1 - roles/download_qcow2/meta/main.yml | 15 ++++---- roles/download_qcow2/tasks/main.yml | 5 ++- roles/download_qcow2/tests/test.yml | 1 - roles/download_qcow2/vars/main.yml | 1 - .../esxi_snapshot_rollback/defaults/main.yml | 1 - roles/esxi_snapshot_rollback/meta/main.yml | 15 ++++---- roles/esxi_snapshot_rollback/tasks/main.yml | 22 +++++++----- roles/esxi_snapshot_rollback/tests/test.yml | 1 - roles/kasm/defaults/main.yml | 5 ++- roles/kasm/handlers/main.yml | 1 - roles/kasm/meta/main.yml | 15 ++++---- roles/kasm/tasks/main.yml | 3 +- roles/kasm/tests/test.yml | 1 - roles/terraform/defaults/main.yml | 9 +++-- roles/terraform/handlers/main.yml | 1 - roles/terraform/meta/main.yml | 15 ++++---- roles/terraform/tasks/main.yml | 5 ++- roles/terraform/tests/test.yml | 1 - roles/vault/handlers/main.yml | 1 - roles/vault/meta/main.yml | 15 ++++---- roles/vault/tasks/main.yml | 27 +++++++------- roles/vault/tests/test.yml | 1 - 39 files changed, 104 insertions(+), 149 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 650d83c..2b7c874 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -130,4 +130,3 @@ task_name_prefix: "{stem} | " # Limit the depth of the nested blocks: # max_block_depth: 20 -... \ No newline at end of file diff --git a/.yamllint b/.yamllint index 25b9107..b1825ee 100644 --- a/.yamllint +++ b/.yamllint @@ -46,6 +46,5 @@ rules: level: error # Allow only YAML 1.2 booleans https://redhat-cop.github.io/automation-good-practices/#_yaml_and_jinja2_syntax allowed-values: - - 'true' - - 'false' -... + - "true" + - "false" diff --git a/collections/requirements.yml b/collections/requirements.yml index fac6b39..a1d991f 100644 --- a/collections/requirements.yml +++ b/collections/requirements.yml @@ -9,4 +9,3 @@ collections: type: git source: https://github.com/djdanielsson/ansible-esxi.git - name: redhat.satellite_operations -... diff --git a/inventory/esxi.yml b/inventory/esxi.yml index ba7169f..b28b2f3 100644 --- a/inventory/esxi.yml +++ b/inventory/esxi.yml @@ -1,6 +1,7 @@ +--- plugin: community.esxi.esxi_inventory -hostname: '192.168.1.229' -username: 'root' +hostname: 192.168.1.229 +username: root group_by: - guestfamily - guestid diff --git a/playbooks/deploy_kasm.yml b/playbooks/deploy_kasm.yml index 2cefbcf..b20d366 100644 --- a/playbooks/deploy_kasm.yml +++ b/playbooks/deploy_kasm.yml @@ -10,4 +10,3 @@ - name: Run kasm role ansible.builtin.include_role: name: kasm -... diff --git a/playbooks/deploy_portainer.yml b/playbooks/deploy_portainer.yml index 66c0655..d5dee7c 100644 --- a/playbooks/deploy_portainer.yml +++ b/playbooks/deploy_portainer.yml @@ -18,11 +18,10 @@ image: portainer/portainer-ce:latest state: started restart: true - restart_policy: "always" + restart_policy: always ports: - - "8000:8000" - - "9443:9443" + - 8000:8000 + - 9443:9443 volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data -... diff --git a/playbooks/deploy_terraform.yml b/playbooks/deploy_terraform.yml index 88d2380..dbf9718 100644 --- a/playbooks/deploy_terraform.yml +++ b/playbooks/deploy_terraform.yml @@ -2,10 +2,8 @@ - name: Terraform hosts: all gather_facts: true - vars_files: - "../vault.yml" + vars_files: ../vault.yml tasks: - name: Run terraform role ansible.builtin.include_role: name: terraform -... diff --git a/playbooks/deploy_vault.yml b/playbooks/deploy_vault.yml index c193d96..2d03c91 100644 --- a/playbooks/deploy_vault.yml +++ b/playbooks/deploy_vault.yml @@ -6,4 +6,3 @@ - name: Run vault role ansible.builtin.include_role: name: vault -... diff --git a/playbooks/download_qcow2.yml b/playbooks/download_qcow2.yml index c447557..72f5312 100644 --- a/playbooks/download_qcow2.yml +++ b/playbooks/download_qcow2.yml @@ -2,12 +2,12 @@ - name: Download_qcow2 hosts: all gather_facts: true - vars_files: - "../vault.yml" + vars_files: ../vault.yml tasks: - name: Stat ansible.builtin.stat: - path: "{{ setup_down_dest_dir }}{% if (rhel_version | int) >= 9 %}rhel-baseos-{{ rhel_version }}-{{ arch }}-kvm.qcow2 {% else %} rhel-{{ rhel_version }}-{{ arch }}-kvm.qcow2{% endif %}" + path: "{{ setup_down_dest_dir }}{% if (rhel_version | int) >= 9 %}rhel-baseos-{{ rhel_version }}-{{ arch }}-kvm.qcow2 {% else %} rhel-{{ rhel_version }}-{{ + arch }}-kvm.qcow2{% endif %}" register: r_qcow2 vars: rhel_version: 8.7 @@ -18,4 +18,3 @@ ansible.builtin.include_role: name: download_qcow2 when: not r_qcow2['stat']['exists'] -... diff --git a/playbooks/install_docker_ubuntu.yml b/playbooks/install_docker_ubuntu.yml index 669374a..675a4bc 100644 --- a/playbooks/install_docker_ubuntu.yml +++ b/playbooks/install_docker_ubuntu.yml @@ -7,4 +7,3 @@ - name: Run Docker Ubuntu role ansible.builtin.include_role: name: docker_ubuntu -... diff --git a/playbooks/install_satellite.yml b/playbooks/install_satellite.yml index 0a4eb9e..fcb5ca3 100644 --- a/playbooks/install_satellite.yml +++ b/playbooks/install_satellite.yml @@ -7,23 +7,22 @@ satellite_installer_scenario: satellite satellite_installer_package: satellite satellite_installer_options: - - '--foreman-initial-organization "lab"' - - '--foreman-initial-location "home"' - - '--foreman-initial-admin-password Password1234!' - - '--foreman-proxy-dns true' - - '--foreman-proxy-dns-managed true' - - '--foreman-proxy-dns-interface eth0' - - '--foreman-proxy-dns-zone lab.danielsson.us.com' - - '--foreman-proxy-dns-reverse 1.168.192.in-addr.arpa' - - '--foreman-proxy-dhcp true' - - '--foreman-proxy-dhcp-managed true' - - '--foreman-proxy-dhcp-interface eth0' + - --foreman-initial-organization "lab" + - --foreman-initial-location "home" + - --foreman-initial-admin-password Password1234! + - --foreman-proxy-dns true + - --foreman-proxy-dns-managed true + - --foreman-proxy-dns-interface eth0 + - --foreman-proxy-dns-zone lab.danielsson.us.com + - --foreman-proxy-dns-reverse 1.168.192.in-addr.arpa + - --foreman-proxy-dhcp true + - --foreman-proxy-dhcp-managed true + - --foreman-proxy-dhcp-interface eth0 # - '--foreman-proxy-dhcp-additional-interfaces eth1' # - '--foreman-proxy-dhcp-additional-interfaces eth2' - - '--foreman-proxy-dhcp-range "192.168.1.100 192.168.1.150"' - - '--foreman-proxy-dhcp-gateway 192.168.1.1' - - '--foreman-proxy-dhcp-nameservers 192.168.1.37' - - '--foreman-proxy-tftp true' - - '--foreman-proxy-tftp-managed true' - - '--foreman-proxy-tftp-servername 192.168.1.37' -... + - --foreman-proxy-dhcp-range "192.168.1.100 192.168.1.150" + - --foreman-proxy-dhcp-gateway 192.168.1.1 + - --foreman-proxy-dhcp-nameservers 192.168.1.37 + - --foreman-proxy-tftp true + - --foreman-proxy-tftp-managed true + - --foreman-proxy-tftp-servername 192.168.1.37 diff --git a/playbooks/revert_aap.yml b/playbooks/revert_aap.yml index 2576742..234539d 100644 --- a/playbooks/revert_aap.yml +++ b/playbooks/revert_aap.yml @@ -16,4 +16,3 @@ - vm_name: aapdb - vm_name: sso - vm_name: service_catalog -... diff --git a/roles/docker_ubuntu/handlers/main.yml b/roles/docker_ubuntu/handlers/main.yml index 8ec0bc7..1f69d2b 100644 --- a/roles/docker_ubuntu/handlers/main.yml +++ b/roles/docker_ubuntu/handlers/main.yml @@ -20,4 +20,3 @@ pre_reboot_delay: 0 post_reboot_delay: 30 test_command: whoami -... diff --git a/roles/docker_ubuntu/meta/main.yml b/roles/docker_ubuntu/meta/main.yml index 56800c3..9496e9d 100644 --- a/roles/docker_ubuntu/meta/main.yml +++ b/roles/docker_ubuntu/meta/main.yml @@ -41,14 +41,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/docker_ubuntu/tasks/main.yml b/roles/docker_ubuntu/tasks/main.yml index e65fd9c..440d6ef 100644 --- a/roles/docker_ubuntu/tasks/main.yml +++ b/roles/docker_ubuntu/tasks/main.yml @@ -15,7 +15,7 @@ state: directory owner: root group: root - mode: '0755' + mode: "0755" - name: One way to avoid apt_key once it is removed from your distro block: @@ -38,7 +38,7 @@ - name: Add docker repo ansible.builtin.apt_repository: - repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable" + repo: deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable filename: docker update_cache: false state: present @@ -72,4 +72,3 @@ - name: Flush handlers ansible.builtin.meta: flush_handlers -... diff --git a/roles/docker_ubuntu/tests/test.yml b/roles/docker_ubuntu/tests/test.yml index 91be79a..99bac51 100644 --- a/roles/docker_ubuntu/tests/test.yml +++ b/roles/docker_ubuntu/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - docker_ubuntu -... diff --git a/roles/download_qcow2/defaults/main.yml b/roles/download_qcow2/defaults/main.yml index 6882ed6..1d9c140 100644 --- a/roles/download_qcow2/defaults/main.yml +++ b/roles/download_qcow2/defaults/main.yml @@ -3,4 +3,3 @@ rhel_version: 8.8 arch: x86_64 # or aarch64 setup_down_dest_dir: /tmp/ -... diff --git a/roles/download_qcow2/meta/main.yml b/roles/download_qcow2/meta/main.yml index 8b6e2be..12a52b5 100644 --- a/roles/download_qcow2/meta/main.yml +++ b/roles/download_qcow2/meta/main.yml @@ -41,14 +41,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/download_qcow2/tasks/main.yml b/roles/download_qcow2/tasks/main.yml index 48fe1aa..44ec074 100644 --- a/roles/download_qcow2/tasks/main.yml +++ b/roles/download_qcow2/tasks/main.yml @@ -17,7 +17,7 @@ method: GET return_content: true headers: - Authorization: "Bearer {{ __r_login.json.access_token }}" + Authorization: Bearer {{ __r_login.json.access_token }} register: __r_images_output - name: Simplify the list of possible downloads @@ -29,7 +29,6 @@ url: "{{ item.downloadHref }}" dest: "{{ setup_down_dest_dir }}/{{ item.filename }}" headers: - Authorization: "Bearer {{ __r_login.json.access_token }}" + Authorization: Bearer {{ __r_login.json.access_token }} when: image_name is match(item.filename) loop: "{{ __cf_images }}" -... diff --git a/roles/download_qcow2/tests/test.yml b/roles/download_qcow2/tests/test.yml index 9e076c3..776ee18 100644 --- a/roles/download_qcow2/tests/test.yml +++ b/roles/download_qcow2/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - download_qcow2 -... diff --git a/roles/download_qcow2/vars/main.yml b/roles/download_qcow2/vars/main.yml index bfbad19..281a765 100644 --- a/roles/download_qcow2/vars/main.yml +++ b/roles/download_qcow2/vars/main.yml @@ -3,4 +3,3 @@ login_url: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token image_url: https://api.access.redhat.com/management/v1/images/rhel/{{ rhel_version }}/x86_64 image_name: "{% if (rhel_version | int) >= 9 %}rhel-baseos-{{ rhel_version }}-{{ arch }}-kvm.qcow2{% else %}rhel-{{ rhel_version }}-{{ arch }}-kvm.qcow2{% endif %}" -... diff --git a/roles/esxi_snapshot_rollback/defaults/main.yml b/roles/esxi_snapshot_rollback/defaults/main.yml index d1edd06..b049042 100644 --- a/roles/esxi_snapshot_rollback/defaults/main.yml +++ b/roles/esxi_snapshot_rollback/defaults/main.yml @@ -5,4 +5,3 @@ get_snapshot_by_name: false get_last_snapshot: false r_vm_snapshots_first: false power_back_on: true -... diff --git a/roles/esxi_snapshot_rollback/meta/main.yml b/roles/esxi_snapshot_rollback/meta/main.yml index 76b78ae..5ba147a 100644 --- a/roles/esxi_snapshot_rollback/meta/main.yml +++ b/roles/esxi_snapshot_rollback/meta/main.yml @@ -42,14 +42,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/esxi_snapshot_rollback/tasks/main.yml b/roles/esxi_snapshot_rollback/tasks/main.yml index 5585f49..7beca6c 100644 --- a/roles/esxi_snapshot_rollback/tasks/main.yml +++ b/roles/esxi_snapshot_rollback/tasks/main.yml @@ -12,7 +12,7 @@ - name: Create dictionary ansible.builtin.set_fact: - vm_ids: "{{ vm_ids | default({}) | combine({((item | split(':'))[0]): ((item | split(':'))[1])}) }}" + vm_ids: "{{ vm_ids | default({}) | combine({((item | split(':'))[0]): ((item | split(':'))[1])}) }}" loop: "{{ __new_lines }}" vars: __new_lines: "{{ r_vm_ids.stdout | split('\n') }}" @@ -28,25 +28,28 @@ # verbosity: 2 - name: Get vm ids - ansible.builtin.shell: "vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i 'Snapshot Name|Snapshot Id' | awk '{ print $3 }'" + ansible.builtin.shell: vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i 'Snapshot Name|Snapshot Id' | awk '{ print $3 }' changed_when: false register: r_vm_snapshots_all when: get_all_snapshots | default(false) - name: Get snapshot by name - ansible.builtin.shell: "vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 '{{ snapshot_name }}' | cut -d ':' -f 2 | grep -v '\\-\\-' | awk '{ print $1 }' | tail -1" + ansible.builtin.shell: vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 '{{ snapshot_name }}' | cut -d ':' -f 2 | grep -v '\-\-' | awk '{ print $1 + }' | tail -1 changed_when: false register: r_vm_snapshots_name when: get_snapshot_by_name | default(false) - name: Get last snapshot - ansible.builtin.shell: "vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 'Snapshot Name' | cut -d ':' -f 2 | grep -v '\\-\\-' | awk '{ print $1 }' | tail -1" + ansible.builtin.shell: vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 'Snapshot Name' | cut -d ':' -f 2 | grep -v '\-\-' | awk '{ print $1 }' | + tail -1 changed_when: false register: r_vm_snapshots_last when: get_last_snapshot | default(false) - name: Get first snapshot - ansible.builtin.shell: "vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 'Snapshot Name' | cut -d ':' -f 2 | grep -v '\\-\\-' | awk '{ print $1 }' | head -2 | tail -1" + ansible.builtin.shell: vim-cmd vmsvc/snapshot.get {{ vm_ids[vm_name] }} | grep -i -A 1 'Snapshot Name' | cut -d ':' -f 2 | grep -v '\-\-' | awk '{ print $1 }' | + head -2 | tail -1 changed_when: false register: r_vm_snapshots_first when: get_first_snapshot | default(false) @@ -56,15 +59,17 @@ msg: "{{ vm_snapshot }}" # verbosity: 2 vars: - vm_snapshot: "{% if get_all_snapshots %}{{ r_vm_snapshots_all }}{% elif get_snapshot_by_name %}{{ r_vm_snapshots_name }}{% elif get_last_snapshot %}{{ r_vm_snapshots_last }}{% elif r_vm_snapshots_first %}{{ r_vm_snapshots_first }}{% else %}'error'{% endif %}" + vm_snapshot: "{% if get_all_snapshots %}{{ r_vm_snapshots_all }}{% elif get_snapshot_by_name %}{{ r_vm_snapshots_name }}{% elif get_last_snapshot %}{{ r_vm_snapshots_last + }}{% elif r_vm_snapshots_first %}{{ r_vm_snapshots_first }}{% else %}'error'{% endif %}" - name: Revert to snapshot {{ r_vm_snapshots }} - ansible.builtin.shell: "vim-cmd vmsvc/snapshot.revert {{ vm_ids[vm_name] }} {{ vm_snapshot.stdout }} suppressPowerOn" + ansible.builtin.shell: vim-cmd vmsvc/snapshot.revert {{ vm_ids[vm_name] }} {{ vm_snapshot.stdout }} suppressPowerOn changed_when: true register: r_revert_output when: revert_2_snapshot | default(false) vars: - vm_snapshot: "{% if get_all_snapshots %}{{ r_vm_snapshots_all }}{% elif get_snapshot_by_name %}{{ r_vm_snapshots_name }}{% elif get_last_snapshot %}{{ r_vm_snapshots_last }}{% elif r_vm_snapshots_first %}{{ r_vm_snapshots_first }}{% else %}'error'{% endif %}" + vm_snapshot: "{% if get_all_snapshots %}{{ r_vm_snapshots_all }}{% elif get_snapshot_by_name %}{{ r_vm_snapshots_name }}{% elif get_last_snapshot %}{{ r_vm_snapshots_last + }}{% elif r_vm_snapshots_first %}{{ r_vm_snapshots_first }}{% else %}'error'{% endif %}" - name: Printout status ansible.builtin.debug: @@ -75,4 +80,3 @@ ansible.builtin.shell: vim-cmd vmsvc/power.on {{ vm_ids[vm_name] }} changed_when: true when: power_back_on -... diff --git a/roles/esxi_snapshot_rollback/tests/test.yml b/roles/esxi_snapshot_rollback/tests/test.yml index bf42252..9890aef 100644 --- a/roles/esxi_snapshot_rollback/tests/test.yml +++ b/roles/esxi_snapshot_rollback/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - esxi_snapshot_rollback -... diff --git a/roles/kasm/defaults/main.yml b/roles/kasm/defaults/main.yml index 4dcc3ed..8380564 100644 --- a/roles/kasm/defaults/main.yml +++ b/roles/kasm/defaults/main.yml @@ -1,5 +1,4 @@ --- # defaults file for kasm -kasm_admin_pass: "Password1234!" -kasm_user_pass: "Password1234!" -... +kasm_admin_pass: Password1234! +kasm_user_pass: Password1234! diff --git a/roles/kasm/handlers/main.yml b/roles/kasm/handlers/main.yml index 03d3e50..e61c84e 100644 --- a/roles/kasm/handlers/main.yml +++ b/roles/kasm/handlers/main.yml @@ -4,4 +4,3 @@ ansible.builtin.file: path: "{{ tmp_dir.path }}" state: absent -... diff --git a/roles/kasm/meta/main.yml b/roles/kasm/meta/main.yml index 1d992fa..f2a7692 100644 --- a/roles/kasm/meta/main.yml +++ b/roles/kasm/meta/main.yml @@ -41,14 +41,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/kasm/tasks/main.yml b/roles/kasm/tasks/main.yml index 22dfde2..0a15ab8 100644 --- a/roles/kasm/tasks/main.yml +++ b/roles/kasm/tasks/main.yml @@ -8,7 +8,7 @@ - name: Download and unpack tar.gz file ansible.builtin.unarchive: - src: "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.15.0.06fdc8.tar.gz" + src: https://kasm-static-content.s3.amazonaws.com/kasm_release_1.15.0.06fdc8.tar.gz dest: "{{ tmp_dir.path }}" remote_src: true mode: "0755" @@ -20,4 +20,3 @@ # no_log: true changed_when: true become: true -... diff --git a/roles/kasm/tests/test.yml b/roles/kasm/tests/test.yml index bf3274b..dab8948 100644 --- a/roles/kasm/tests/test.yml +++ b/roles/kasm/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - kasm -... diff --git a/roles/terraform/defaults/main.yml b/roles/terraform/defaults/main.yml index 9768d92..2c2540b 100644 --- a/roles/terraform/defaults/main.yml +++ b/roles/terraform/defaults/main.yml @@ -5,22 +5,22 @@ rhel8_vms: fqdn: lab.danielsson.us.com mem: 8 cpu: 8 - notes: "automationcontroller" + notes: automationcontroller - name: hub1 fqdn: lab.danielsson.us.com mem: 8 cpu: 8 - notes: "automationhub" + notes: automationhub - name: aapdb fqdn: lab.danielsson.us.com mem: 8 cpu: 2 - notes: "database" + notes: database - name: eda fqdn: lab.danielsson.us.com mem: 8 cpu: 8 - notes: "automationedacontroller" + notes: automationedacontroller - name: testrhel8 fqdn: lab.danielsson.us.com mem: 2 @@ -71,4 +71,3 @@ cloud_files: - name: fedora-cloud.tpl - name: rhel9-cloud.tpl - name: rhel8-cloud.tpl -... diff --git a/roles/terraform/handlers/main.yml b/roles/terraform/handlers/main.yml index 4125a09..3fa965d 100644 --- a/roles/terraform/handlers/main.yml +++ b/roles/terraform/handlers/main.yml @@ -10,4 +10,3 @@ cloud.terraform.terraform: project_path: /tmp/terraform state: present -... diff --git a/roles/terraform/meta/main.yml b/roles/terraform/meta/main.yml index fe458f3..7c561ac 100644 --- a/roles/terraform/meta/main.yml +++ b/roles/terraform/meta/main.yml @@ -41,14 +41,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/terraform/tasks/main.yml b/roles/terraform/tasks/main.yml index adb6bab..9e5f15e 100644 --- a/roles/terraform/tasks/main.yml +++ b/roles/terraform/tasks/main.yml @@ -17,13 +17,13 @@ - name: Generate cloud templates from list ansible.builtin.template: src: "{{ item.name }}.j2" - dest: "/tmp/terraform/{{ item.name }}" + dest: /tmp/terraform/{{ item.name }} loop: "{{ cloud_files }}" - name: Generate templates from list ansible.builtin.template: src: "{{ virt_manager }}-{{ item.src }}" - dest: "/tmp/terraform/{{ virt_manager }}-{{ item.dest }}" + dest: /tmp/terraform/{{ virt_manager }}-{{ item.dest }} loop: "{{ terraform_templates }}" - name: Flush handlers @@ -39,4 +39,3 @@ path: /tmp/terraform state: absent when: cleanup | default(false) -... diff --git a/roles/terraform/tests/test.yml b/roles/terraform/tests/test.yml index 6951f13..3efc375 100644 --- a/roles/terraform/tests/test.yml +++ b/roles/terraform/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - terraform -... diff --git a/roles/vault/handlers/main.yml b/roles/vault/handlers/main.yml index 3d0fd6a..0cc0715 100644 --- a/roles/vault/handlers/main.yml +++ b/roles/vault/handlers/main.yml @@ -5,4 +5,3 @@ name: vault state: started enabled: true -... diff --git a/roles/vault/meta/main.yml b/roles/vault/meta/main.yml index cc8f516..2462ec0 100644 --- a/roles/vault/meta/main.yml +++ b/roles/vault/meta/main.yml @@ -41,14 +41,11 @@ galaxy_info: # - 99.99 galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. +# List tags for your role here, one per line. A tag is a keyword that describes +# and categorizes the role. Users find roles by searching for tags. Be sure to +# remove the '[]' above, if you add tags to this list. +# +# NOTE: A tag is limited to a single word comprised of alphanumeric characters. +# Maximum 20 tags per role. dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. -... diff --git a/roles/vault/tasks/main.yml b/roles/vault/tasks/main.yml index ce1e7a7..73327b6 100644 --- a/roles/vault/tasks/main.yml +++ b/roles/vault/tasks/main.yml @@ -36,9 +36,9 @@ zone: public immediate: true loop: - - "8200/tcp" - - "443/tcp" - - "80/tcp" + - 8200/tcp + - 443/tcp + - 80/tcp - name: Update hosts file ansible.builtin.lineinfile: @@ -47,30 +47,30 @@ - name: Generate an OpenSSL private key community.crypto.openssl_privatekey: - path: "/opt/vault/tls/vault.pem" + path: /opt/vault/tls/vault.pem owner: vault group: vault - name: Generate an OpenSSL Certificate Signing Request with Subject information community.crypto.openssl_csr: - path: "/opt/vault/tls/vault.csr" - privatekey_path: "/opt/vault/tls/vault.pem" + path: /opt/vault/tls/vault.csr + privatekey_path: /opt/vault/tls/vault.pem country_name: US organization_name: Red Hat state_or_province_name: North Carolina locality_name: Raleigh common_name: "{{ ansible_fqdn }}" subject_alt_name: - - "IP:{{ ansible_default_ipv4['address'] }}" - - "DNS:{{ ansible_fqdn }}" + - IP:{{ ansible_default_ipv4['address'] }} + - DNS:{{ ansible_fqdn }} owner: vault group: vault - name: Generate a Self Signed OpenSSL certificate community.crypto.x509_certificate: - path: "/opt/vault/tls/vault_cert.pem" - privatekey_path: "/opt/vault/tls/vault.pem" - csr_path: "/opt/vault/tls/vault.csr" + path: /opt/vault/tls/vault_cert.pem + privatekey_path: /opt/vault/tls/vault.pem + csr_path: /opt/vault/tls/vault.csr provider: selfsigned owner: vault group: vault @@ -79,14 +79,13 @@ ansible.builtin.meta: flush_handlers - name: Initialize vault - ansible.builtin.command: "vault operator init -tls-skip-verify" + ansible.builtin.command: vault operator init -tls-skip-verify changed_when: true register: r_keys environment: - VAULT_ADDR: "https://{{ ansible_default_ipv4['address'] }}:8200" + VAULT_ADDR: https://{{ ansible_default_ipv4['address'] }}:8200 # VAULT_ADDR: "https://{{ ansible_fqdn }}:8200" - name: Print out keys ansible.builtin.debug: var: r_keys['stdout_lines'] -... diff --git a/roles/vault/tests/test.yml b/roles/vault/tests/test.yml index 5da48a7..2a0a71e 100644 --- a/roles/vault/tests/test.yml +++ b/roles/vault/tests/test.yml @@ -4,4 +4,3 @@ remote_user: root roles: - vault -...