Add Johnson host to ansible hosts.sample (#13)
This commit is contained in:
		
							parent
							
								
									1f2d26d244
								
							
						
					
					
						commit
						5a560250f1
					
				
					 5 changed files with 26 additions and 9 deletions
				
			
		| 
						 | 
					@ -14,6 +14,16 @@ $ ansible-playbook -i hosts redbrick-ansible.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
This command assumes `hosts` is your hosts file, you can copy the sample host file and modify the credentials in `group_vars`
 | 
					This command assumes `hosts` is your hosts file, you can copy the sample host file and modify the credentials in `group_vars`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Examples
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Adding new users to aperture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					When you want to add a new user to all of the aperture servers, run the below command. You'll also need to edit [`roles/ssh/defaults/main.yml`](./roles/ssh/defaults/main.yml`).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					ansible-playbook -i hosts redbrick-ansible.yml -e "created_users_pass=hellothere"
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Contributing
 | 
					## Contributing
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Please add all roles into the `roles` directory, following the same directory structure.
 | 
					Please add all roles into the `roles` directory, following the same directory structure.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,10 @@
 | 
				
			||||||
glados ansible_host=10.10.0.4
 | 
					glados ansible_host=10.10.0.4
 | 
				
			||||||
wheatley ansible_host=10.10.0.5
 | 
					wheatley ansible_host=10.10.0.5
 | 
				
			||||||
chell ansible_host=10.10.0.6
 | 
					chell ansible_host=10.10.0.6
 | 
				
			||||||
 | 
					johnson ansible_host=10.10.0.7
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[nomad]
 | 
					[nomad]
 | 
				
			||||||
glados
 | 
					glados
 | 
				
			||||||
wheatley
 | 
					wheatley
 | 
				
			||||||
chell
 | 
					chell
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,12 +8,12 @@
 | 
				
			||||||
  roles:
 | 
					  roles:
 | 
				
			||||||
      - { role: git-compare-head } # Prevent execution on out-of-date or divergent branches
 | 
					      - { role: git-compare-head } # Prevent execution on out-of-date or divergent branches
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# - name: Redbrick general management
 | 
					- name: Redbrick general management
 | 
				
			||||||
#   hosts: all
 | 
					  hosts: all
 | 
				
			||||||
#   roles:
 | 
					  roles:
 | 
				
			||||||
#- { role: apt } # update all packages, equivalent to `apt update && apt upgrade`
 | 
					      - { role: apt } # update all packages, equivalent to `apt update && apt upgrade`
 | 
				
			||||||
#- { role: ssh } # add users defined in roles/defaults/main.yml
 | 
					      - { role: ssh } # add users defined in roles/defaults/main.yml
 | 
				
			||||||
#- { role: fail2ban } # add and configure fail2ban with jail file located in `templates/fail2ban.jail`
 | 
					      - { role: fail2ban } # add and configure fail2ban with jail file located in `templates/fail2ban.jail`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# - name: Configure Nomad & Consul
 | 
					# - name: Configure Nomad & Consul
 | 
				
			||||||
#   hosts: nomad
 | 
					#   hosts: nomad
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,9 +2,12 @@
 | 
				
			||||||
# a current listing of all admins who have ssh access to Redbrick.
 | 
					# a current listing of all admins who have ssh access to Redbrick.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
github_users:
 | 
					github_users:
 | 
				
			||||||
  - user: distro
 | 
					  - user: mojito # user account
 | 
				
			||||||
    # omitting account variable won't add any github keys to the user.
 | 
					    account: DistroByte # github account
 | 
				
			||||||
    account: DistroByte
 | 
					    groups: ["sudo"] # list of groups
 | 
				
			||||||
 | 
					    passwordless_sudo: true
 | 
				
			||||||
 | 
					  - user: jameson
 | 
				
			||||||
 | 
					    account: wizzdom
 | 
				
			||||||
    groups: ["sudo"]
 | 
					    groups: ["sudo"]
 | 
				
			||||||
    passwordless_sudo: true
 | 
					    passwordless_sudo: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,6 +14,8 @@
 | 
				
			||||||
    append: yes
 | 
					    append: yes
 | 
				
			||||||
    home: /home/{{ item.user | default(item) }}
 | 
					    home: /home/{{ item.user | default(item) }}
 | 
				
			||||||
    state: present
 | 
					    state: present
 | 
				
			||||||
 | 
					    password: "{{ created_users_pass }}"
 | 
				
			||||||
 | 
					    update_password: "on_create"
 | 
				
			||||||
  with_items: "{{ github_users }}"
 | 
					  with_items: "{{ github_users }}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Ensure authorized_keys for GitHub user accounts are present
 | 
					- name: Ensure authorized_keys for GitHub user accounts are present
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue