working on bootstrap.yml
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
/home/heath/Development/ansible/files
|
||||
Reference in New Issue
Block a user