From b5e4e2fa40c1c7a69269847a017c2007244a959b Mon Sep 17 00:00:00 2001 From: lolli001 Date: Thu, 1 Aug 2024 12:31:04 -0400 Subject: [PATCH] Syntax fix --- rhel-arm-baseline.yaml | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/rhel-arm-baseline.yaml b/rhel-arm-baseline.yaml index 475aa56..72b926a 100644 --- a/rhel-arm-baseline.yaml +++ b/rhel-arm-baseline.yaml @@ -1,33 +1,33 @@ --- - name: RHEL ARM Baseline -hosts: all -become: true -tasks: - - name: Ensure latest packages are installed - package: - name: '*' - state: latest + hosts: all + become: true + tasks: + - name: Ensure latest packages are installed + package: + name: "*" + state: latest - -name: Install require packages - package: - name: - - vim - - git - - wget - - net-tools - - unzip - - epel-release - - htop - state: present + - name: Install required packages + package: + name: + - vim + - git + - wget + - net-tools + - unzip + - epel-release + - htop + state: present -- name: Remove curl-minimal if installed - package: - name: curl-minimal - state: absent + - name: Remove curl-minimal if installed + package: + name: curl-minimal + state: absent -- name: Install curl - package: - name: curl + - name: Install curl + package: + name: curl state: present - name: Create example user @@ -36,13 +36,13 @@ tasks: state: present groups: wheel shell: /bin/bash - password: "{{ 'password' | password_hash('sha512') }}" # Change 'password' to a secure password or hash + password: "{{ 'password' | password_hash('sha512') }}" # Change 'password' to a secure password or hash - name: Configure SSH for exampleuser authorized_key: user: exampleuser state: present - key: "{{ lookup('file', '/path/to/exampleuser_ssh_key.pub') }}" # Replace with the actual path to the public key + key: "{{ lookup('file', '/path/to/exampleuser_ssh_key.pub') }}" # Replace with the actual path to the public key - name: Ensure firewalld is installed and running package: @@ -57,7 +57,7 @@ tasks: - name: Open SSH port in firewall firewalld: - service: ssh + service: ssh permanent: true state: enabled immediate: yes @@ -70,10 +70,10 @@ tasks: command: timedatectl set-timezone UTC - name: Reboot the system to apply changes - reboot: + reboot: msg: "Reboot initiated by Ansible for baseline setup" connect_timeout: 5 reboot_timeout: 600 pre_reboot_delay: 0 post_reboot_delay: 30 - test_command: whoami \ No newline at end of file + test_command: whoami