diff --git a/rhel-arm-baseline.yaml b/rhel-arm-baseline.yaml index 1f5c81f..1747162 100644 --- a/rhel-arm-baseline.yaml +++ b/rhel-arm-baseline.yaml @@ -1,16 +1,17 @@ +--- - name: RHEL ARM Baseline hosts: all become: true - vars: - http_proxy: "http://proxy.tco.census.gov:3128" - https_proxy: "http://proxy.tco.census.gov:3128" - no_proxy: ".census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev,us-gov-west-1.compute.internal,.us-gov-west-1.compute.internal" tasks: - name: Set proxy environment variables - set_fact: - http_proxy: "{{ http_proxy }}" - https_proxy: "{{ https_proxy }}" - no_proxy: "{{ no_proxy }}" + lineinfile: + path: /etc/environment + line: "{{ item }}" + create: yes + with_items: + - "http_proxy=http://proxy.tco.census.gov:3128" + - "https_proxy=http://proxy.tco.census.gov:3128" + - "no_proxy=.census.gov,169.254.169.254,148.129.*,10.*,172.18.*,172.22.*,172.23.*,172.24.*,172.25.*,.eks.amazonaws.com,.s3.amazonaws.com,.amazonaws.com,.gcr.io,.pkg.dev,us-gov-west-1.compute.internal,.us-gov-west-1.compute.internal" - name: Ensure latest packages are installed package: @@ -28,6 +29,11 @@ - htop state: present + - name: Install pip3 + package: + name: python3-pip + state: present + - name: Remove curl-minimal if installed package: name: curl-minimal @@ -42,12 +48,7 @@ pip: name: passlib state: present - extra_args: "--trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy={{ http_proxy }}" executable: /usr/bin/pip3 - environment: - http_proxy: "{{ http_proxy }}" - https_proxy: "{{ https_proxy }}" - no_proxy: "{{ no_proxy }}" - name: Create example user user: @@ -55,7 +56,7 @@ state: present groups: wheel shell: /bin/bash - password: "{{ 'secure_password' | password_hash('sha512') }}" # Replace 'secure_password' with an actual secure password or hash + password: "{{ 'password' | password_hash('sha512') }}" # Change 'password' to a secure password or hash - name: Configure SSH for exampleuser authorized_key: