Skip to content

Commit

Permalink
pip fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Aug 1, 2024
1 parent 46f10b5 commit f563e39
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions rhel-arm-baseline.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -42,20 +48,15 @@
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:
name: exampleuser
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:
Expand Down

0 comments on commit f563e39

Please sign in to comment.