You need to sign in or sign up before continuing.
Commit 40eda0a5 authored by Todor Kondic's avatar Todor Kondic

Add bootstrap stage

parent 37403861
- hosts: planb
become: True
vars_files:
- meta/bs_vars.yml # This is not in the repo for security
# reasons.
pre_tasks:
- name: Update repositories
apt: update_cache=yes
changed_when: False
tasks:
- name: Ensure sudo exists.
apt:
name: [ 'sudo' ]
- name: Add sudo user.
user:
name: bs_user.login
comment: bs_user.name
groups: sudo, adm, cdrom, dip, plugdev
shell: /bin/bash
password: "{{ bs_user.password | password_hash('sha512') }}"
update_password: on_create
#!/bin/sh
LOGINUSER=$1
shift
ansible-playbook -i hosts.txt bootstrap.yml\
--vault-password-file meta/zubizareta\
-u "$LOGINUSER" -K -k --become-method su "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment