Add all files needed to bring up VM and run agaric.com locally

This commit is contained in:
benjamin melançon 2018-08-20 10:45:20 -04:00
parent 52c8b60bac
commit 4d2bc0ee24
742 changed files with 24037 additions and 0 deletions

View file

@ -0,0 +1,15 @@
---
admin_user: my_admin_username
# On RHEL/CentOS, 'wheel'; on Debian/Ubuntu, 'sudo'.
admin_group: sudo
# IMPORTANT: Configure your own password for the admin user account. To generate
# a password hash, use either of the following commands:
# - `openssl passwd -1 [password]`
# - `mkpasswd --method=SHA-512`.
admin_password: $1$HgT69GsW$qZ8FUJHafZZWD76KXgAZO/
# Configuration for copying local public SSH key to admin's authorized_keys.
admin_copy_ssh_pubkey: true
admin_pubkey: ~/.ssh/id_rsa.pub

View file

@ -0,0 +1,40 @@
---
- hosts: drupalvm
gather_facts: no
vars_files:
- vars.yml
pre_tasks:
# See: https://github.com/geerlingguy/drupal-vm/issues/1245
- name: Install Python if it's not available.
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
register: output
changed_when: output.stdout != ""
- action: setup
tasks:
- name: Create admin user account.
user:
name: "{{ admin_user }}"
createhome: yes
home: "/home/{{ admin_user }}"
generate_ssh_key: yes
ssh_key_comment: "ansible-{{ inventory_hostname }}"
password: "{{ admin_password }}"
groups: "{{ admin_group }}"
shell: /bin/bash
- name: Add local SSH public key to admin account authorized_keys.
authorized_key:
user: "{{ admin_user }}"
key: "{{ lookup('file', admin_pubkey) }}"
manage_dir: yes
when: admin_copy_ssh_pubkey
- name: Disable requiretty.
lineinfile:
dest: /etc/sudoers
regexp: '^Defaults.+requiretty'
line: 'Defaults !requiretty'
state: present