File tree Expand file tree Collapse file tree 8 files changed +114
-1
lines changed Expand file tree Collapse file tree 8 files changed +114
-1
lines changed Original file line number Diff line number Diff line change 1
- # automation
1
+ # Automation
2
+
3
+ ## Dependencies
4
+
5
+ - Ansible
6
+ - ` sudo apt-get install python3-pip -y `
7
+ - ` pip3 install ansible `
8
+
9
+ ## Run a specific role
10
+
11
+ ``` bash
12
+ ansible-playbook --connection=local --inventory=127.0.0.1, --ask-become-pass playbook.yml -v -t multipass
13
+ ```
14
+
15
+ - Docker
16
+
17
+ ``` bash
18
+ ansible-galaxy role install geerlingguy.docker
19
+ ansible-playbook --connection=local --inventory=127.0.0.1, --ask-become-pass playbook.yml -v -t docker -e ' docker_users=[mandy]'
20
+ ```
Original file line number Diff line number Diff line change
1
+ ---
2
+ - hosts : all
3
+ gather_facts : true
4
+ become : true
5
+ roles :
6
+ - role : zsh
7
+ tags : zsh
8
+ - role : multipass
9
+ tags : multipass
10
+ - role : libvirt
11
+ tags : libvirt
12
+ - role : geerlingguy.docker
13
+ tags : docker
Original file line number Diff line number Diff line change
1
+ # Libvirt
2
+
3
+ ## Installation
4
+
5
+ ``` bash
6
+ sudo apt-get update
7
+ sudo apt-get install virt-manager -y --no-install-recommends
8
+
9
+ sudo usermod -aG libvirt " $USER "
10
+ ```
Original file line number Diff line number Diff line change
1
+ - name : Install libbirt
2
+ ansible.builtin.package :
3
+ name : virt-manager
4
+ state : present
5
+ become : true
Original file line number Diff line number Diff line change
1
+ # Multipass
2
+
3
+ ## Linux
4
+
5
+ ### Installation
6
+
7
+ ``` bash
8
+ sudo snap install multipass
9
+ sudo snap connect multipass:libvirt
10
+ ```
11
+
12
+ [ Install libvirt] ( ../libvirt/README.md#installation )
13
+
14
+ ### Configuration
15
+
16
+ Backend configuration
17
+
18
+ ` multipass set local.driver lxd `
19
+
20
+ ` multipass set local.driver libvirt `
21
+
22
+ ### Launching VM's
23
+
24
+ - Rocky linux (running other cloud images than Ubuntu is only supported on Linux)
25
+ ` multipass launch -n rocky -c 2 -d 10G -m 4G https://download.rockylinux.org/pub/rocky/8.6/images/Rocky-8-GenericCloud.latest.x86_64.qcow2 `
Original file line number Diff line number Diff line change
1
+
2
+ - name : Install Multipass
3
+ community.general.snap :
4
+ name : multipass
5
+ become : true
6
+ - name : Install libvirt
7
+ ansible.builtin.import_role :
8
+ name : libvirt
9
+ - name : Connect to libvirt
10
+ ansible.builtin.shell :
11
+ cmd : sudo snap connect multipass:libvirt
Original file line number Diff line number Diff line change
1
+ # ZSH
2
+
3
+ ## Installation
4
+
5
+ ``` bash
6
+ sudo apt-get update
7
+ sudo apt-get install zsh fzf --no-install-recommends -y
8
+ ```
9
+
10
+ [ Documentation on configuring ZSH to play nicely with Snaps] ( https://askubuntu.com/questions/910821/programs-installed-via-snap-not-showing-up-in-launcher )
11
+
12
+ ``` yaml
13
+
14
+ ```
Original file line number Diff line number Diff line change
1
+ - name : Install ZSH
2
+ ansible.builtin.package :
3
+ name : zsh
4
+ state : present
5
+ become : true
6
+ - name : Install fzf
7
+ ansible.builtin.package :
8
+ name : fzf
9
+ state : present
10
+ become : true
11
+ - name : Ensure /etc/profile sh emulation for ZSH
12
+ ansible.builtin.lineinfile :
13
+ path : /etc/zsh/zprofile
14
+ regexp : " ^emulate sh.*/etc/profile"
15
+ line : emulate sh -c 'source /etc/profile'
16
+ become : true
You can’t perform that action at this time.
0 commit comments