Page:
Playbook for Linux Users
Pages
Ansible Configuration
Configure Linux Nodes
Configure Window Nodes
Configuring an AD Sudo Group
DFS01 DFS02 Basic Config
DHCPD Configuration
Docker Configuration
Final
GPO DFS Based Profiles & Home Directories
GPO Remote Desktop
GPO Wallpaper
Home
Mgmt02 sparkle configuration
Milestone 1
Milestone 2
Network Diagrams
Playbook for Linux Users
Playbook for Windows Domain User
RVTM
Redundant ADDS Config
Redundant DFS Setup
System Infrastructure and Assignments
System Infrastructure
Util Configuration
W1 Milestone 1
W2 Milestone 1
Who did what
dhcp1 razzle configuration
dhcp2 dazzle configuration
No results
5
Playbook for Linux Users
Hannelore Sanokklis edited this page 2024-04-27 18:33:27 -04:00
Run Linux passwordless SSH commands
Make sure you re-run these commands everytime you come back to your machine!
eval $(ssh-agent)
ssh-add -t 14400
Make the playbook
- make
linux_users.ymlfile in theansibledirectory
- use your favorite text editor to make your playbook!
---
- name: Create a Linux Local User
hosts: linux
become: yes
tasks:
- name: Add user sparkle-gremlin
user:
name: sparkle-gremlin
password: "{{ 'password' | password_hash('sha512') }}"
shell: /bin/bash
home: /home/sparkle-gremlin
Run the playbook
ansible-playbook -u sparkle-deployer -i linux_hosts.txt linux_user.yml- I am running this command form the
sparkleuser account so using theucommand allows me to specify that I want the playbook to run with thesparkle-deployeraccount. - the
-iflag lets you tell ansible which inventory file you will be using.
- I am running this command form the
SSH into new accounts on the linux machines!
docker-sparkle
ssh sparkle-gremlin@docker-sparkle
util-sparkle
ssh sparkle-gremlin@util-sparkle
dhcp1-razzle
ssh sparkle-gremlin@dchp1-razzle
dhcp2-dazzle
ssh sparkle-gremlin@dchp2-dazzle