working on bootstrap.yml

This commit is contained in:
2026-07-11 11:31:14 -05:00
parent 3a6818e9d1
commit 0177a6df37
2 changed files with 81 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
---
# Update software repositories here
# Change the following to work with multiple distros
- name: Prepare for hpf-ans configuration
hosts: all
become: yes
pre_tasks:
- name: Install bootstrap packages
ansible.builtin.apt:
state: latest
pkg:
- bash
- curl
- python3
- python3-pip
- python3-venv
- python3-virtualenv
- name: Make sure hpf-sudo group exists
ansible.builtin.group:
name: hpf-sudo
state: present
system: true
gid: 700
- name: Make sure hpf-sudo-np group exists
ansible.builtin.group:
name: hpf-sudo-np
state: present
system: true
gid: 701
- name: Copy over /etc/sudoers.d/hpf
ansible.builtin.copy:
src: etc_sudoers_d_hpf
dest: /etc/sudoers.d/hpf
owner: root
group: root
mode: u=rw,go=
backup: true
validate: /usr/sbin/visudo -csf %s
- name: Make sure hpf-ans group exists
ansible.builtin.group:
name: hpf-ans
state: present
system: true
gid: 800
- name: Make sure hpf-ans user exists
ansible.builtin.user:
name: hpf-ans
state: present
system: true
uid: 800
group: hpf-ans
groups: hpf-sudo-np
append: yes
create_home: true
shell: /bin/bash
- name: Install latest version of pip in .ansible-venv
ansible.builtin.pip:
name: pip
virtualenv: $HOME/.ansible-venv
extra_args: --upgrade
become: no
- name: Install latest version of ansible in .ansible-venv
ansible.builtin.pip:
name: ansible
virtualenv: $HOME/.ansible-venv
extra_args: --upgrade
become: no
+1
View File
@@ -0,0 +1 @@
/home/heath/Development/ansible/files