Add all files needed to bring up VM and run agaric.com locally
This commit is contained in:
parent
52c8b60bac
commit
4d2bc0ee24
742 changed files with 24037 additions and 0 deletions
40
box/examples/prod/bootstrap/init.yml
Normal file
40
box/examples/prod/bootstrap/init.yml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue