Compare commits

...

5 Commits

Author SHA256 Message Date
heath d46ebceabe bin/ansible-pull.sh 2026-07-11 12:55:46 -05:00
heath c778125cb1 x 2026-07-11 12:41:00 -05:00
heath 0177a6df37 working on bootstrap.yml 2026-07-11 11:31:14 -05:00
heath 3a6818e9d1 have bootstrap.sh install python3-virtualenv 2026-07-11 11:29:20 -05:00
heath fe974643ae moved bootstrap files into files directory 2026-07-11 10:43:22 -05:00
5 changed files with 100 additions and 3 deletions
+3 -3
View File
@@ -7,8 +7,8 @@
GIT_REPO_BASE="https://gitea.admin-a.hpetersenfamily.com/heath/ansible" GIT_REPO_BASE="https://gitea.admin-a.hpetersenfamily.com/heath/ansible"
GIT_REPO="${GIT_REPO_BASE}.git" GIT_REPO="${GIT_REPO_BASE}.git"
GIT_REPO_sudoers_d_hpf="${GIT_REPO_BASE}/raw/branch/main/etc_sudoers_d_hpf" GIT_REPO_sudoers_d_hpf="${GIT_REPO_BASE}/raw/branch/main/files/etc_sudoers_d_hpf"
GIT_REPO_ansible_pull_sh="${GIT_REPO_BASE}/raw/branch/main/home_hpf_ans_bin_ansible-pull.sh" GIT_REPO_ansible_pull_sh="${GIT_REPO_BASE}/raw/branch/main/files/home_hpf_ans_bin_ansible-pull.sh"
ETC_sudoers_d_hpf="/etc/sudoers.d/hpf" ETC_sudoers_d_hpf="/etc/sudoers.d/hpf"
@@ -86,7 +86,7 @@ fi
# Install minimal necessary packages # Install minimal necessary packages
if which -s apt ; then if which -s apt ; then
apt update apt update
apt install bash curl python3 python3-pip python3-venv -y apt install bash curl python3 python3-pip python3-venv python3-virtualenv -y
else else
echo "ERROR - Unable to determine how to install packages" >&2 echo "ERROR - Unable to determine how to install packages" >&2
exit 101 exit 101
+96
View File
@@ -0,0 +1,96 @@
---
# Update software repositories here
# Change the following to work with multiple distros
- name: bootstrap
hosts: all
become: yes
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
-name: Make sure bin directory exists
ansible.builtin.file:
path: $HOME/bin
state: directory
owner: hpf-ans
group: hpf-ans
mode: u=rwx,go=
become: no
- name: Copy over bin/ansible-pull.sh
ansible.builtin.copy:
src: home_hpf_ans_bin_ansible_pull_sh
dest: $HOME/bin/ansible-pull.sh
owner: hpf-ans
group: hpf-ans
mode: u=rwx,go=
+1
View File
@@ -0,0 +1 @@
/home/heath/Development/ansible/files