diff --git a/build.pkr.hcl b/build.pkr.hcl index 63c860a..3f3ef12 100644 --- a/build.pkr.hcl +++ b/build.pkr.hcl @@ -26,7 +26,6 @@ build { inline_shebang = "/bin/sh" inline = [ "echo 'Build finished!'", - "echo '${build.amis}' > ami_id.txt", ] } } \ No newline at end of file diff --git a/rhel-arm-baseline.yaml b/rhel-arm-baseline.yaml index 9f15bca..491569b 100644 --- a/rhel-arm-baseline.yaml +++ b/rhel-arm-baseline.yaml @@ -2,15 +2,26 @@ - name: RHEL ARM Baseline hosts: all become: true + vars: + ansible_python_interpreter: /usr/bin/python3.9 # Explicitly define the Python interpreter tasks: + - name: Install pip + package: + name: python3-pip + state: present + + - name: Install passlib + pip: + name: passlib + - name: Ensure latest packages are installed - yum: + package: name: "*" state: latest - name: Install required packages - yum: + package: name: - vim - git @@ -21,12 +32,12 @@ state: present - name: Remove curl-minimal if installed - yum: + package: name: curl-minimal state: absent - name: Install curl - yum: + package: name: curl state: present @@ -36,7 +47,7 @@ state: present groups: wheel shell: /bin/bash - password: "{{ 'secure_password' | password_hash('sha512') }}" # Replace 'secure_password' with a strong password + password: "{{ 'password' | password_hash('sha512') }}" # Change 'password' to a secure password or hash - name: Configure SSH for exampleuser authorized_key: @@ -45,7 +56,7 @@ 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 - yum: + package: name: firewalld state: present