Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

57 lines
1.5 KiB

---
- hosts: vm_hosts
tasks:
- name: install lxc related packages
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- lxc
- python
- python-lxc
- name: install bridge utilities
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- bridge-utils
notify: restart networking
# We should fix this bug. We really should. It's a bug.
# Bridge-utils requires a complete system reboot to enable the new bridge.
- name: configure bridge
template:
src: templates/interfaces.j2
dest: /etc/network/interfaces
notify: restart networking
- name: install utilities
apt:
name: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 3600
with_items:
- vim
- htop
- name: add ca pub key
copy:
content: "ssh-rsa {{ user_ca_key }}"
dest: /etc/ssh/user_ca.pub
- name: trust ca pub key
lineinfile:
dest: /etc/ssh/sshd_config
state: present
line: "TrustedUserCAKeys /etc/ssh/user_ca.pub"
notify: restart sshd
handlers:
- name: restart networking
service:
name: networking
state: reloaded
- name: restart sshd
service:
name: networking
state: reloaded