-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Role improved #1
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b9b3c75
Some code updates
basilgood 6579420
New path to unix.socket
basilgood bda25c3
Code yaml corrected
basilgood 7798276
Add item.url
basilgood dd37379
Install lxd only from snap
basilgood ab3433a
Inventory update
basilgood bd9c33b
Disable security apparmor for nested containers
basilgood e38b730
Spell correct
basilgood 5dc211a
Add dependencies
basilgood 5e45239
Inventory updates
basilgood File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,3 @@ | |
remote_tmp = /tmp/.ansible-${USER}/tmp | ||
local_tmp = $HOME/.ansible/tmp | ||
pipelining=True | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
|
||
- name: Install dependencies | ||
apt: | ||
name: '{{ item }}' | ||
update_cache: true | ||
with_items: | ||
- software-properties-common | ||
- snapd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
--- | ||
- name: Ensure APT LXD repository (stable) | ||
apt_repository: repo='ppa:ubuntu-lxc/lxd-stable' update_cache='yes' | ||
when: lxd_apt_stable_repo | ||
|
||
- name: Install LXD | ||
package: name={{ item }} state=present | ||
with_items: '{{ lxd_packages }}' | ||
- name: Ensure there is no lxd installed from repo | ||
apt: | ||
name: '{{ item }}' | ||
with_items: | ||
- lxd | ||
- lxd-client | ||
|
||
- name: Install LXD with snap | ||
shell: snap install {{ item }} | ||
with_items: | ||
- lxd --channel=3.0 | ||
- lxd | ||
changed_when: false | ||
|
||
- name: Add users to lxd group | ||
user: name={{ item }} groups=lxd append=yes | ||
user: | ||
name: '{{ item }}' | ||
groups: lxd | ||
append: true | ||
with_items: '{{ lxd_users }}' | ||
register: lxd_group_users_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
--- | ||
|
||
- include: install.yml | ||
- import_tasks: dependencies.yml | ||
tags: [lxd, lxd-install] | ||
|
||
- include: configure.yml | ||
- import_tasks: install.yml | ||
tags: [lxd, lxd-install] | ||
|
||
- import_tasks: configure.yml | ||
tags: [lxd, lxd-configure] | ||
|
||
- include: containers.yml | ||
- import_tasks: containers.yml | ||
tags: [lxd, lxd-containers] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
localhost ansible_connection=local | ||
# localhost ansible_connection=local | ||
lxc ansible_host=10.180.70.93 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
--- | ||
|
||
- hosts: localhost | ||
become: True | ||
- hosts: all | ||
become: true | ||
roles: | ||
- role: plumelo.lxd | ||
lxd_packages: ['lxd'] | ||
lxd_users: ['travis'] | ||
lxd_users: ['ubuntu'] | ||
lxd_dns_ipv4: '10.229.31.1' | ||
lxd_prepend_dns: ['{{ lxd_dns_ipv4 }}'] | ||
lxd_default_bridge_ipv4_address: '{{ lxd_dns_ipv4 }}/24' | ||
lxd_default_pool_driver: dir | ||
lxd_default_pool_config: {} | ||
cloud_config: | ||
package_upgrade: true | ||
manage_etc_hosts: true | ||
hostname: xenial | ||
packages: | ||
- python | ||
- acl | ||
- sudo | ||
lxd_user_data: "#cloud-config\n{{ cloud_config|to_yaml(indent=2) }}" | ||
lxd_containers: | ||
- name: xenial | ||
state: started | ||
become_user: travis | ||
alias: 'x' | ||
config: | ||
user.user-data: "#cloud-config\n{{ cloud_config|combine({'hostname': 'xenial'})|to_yaml(indent=2) }}" | ||
security.nesting: 'true' | ||
security.privileged: 'true' | ||
user.user-data: "{{lxd_user_data}}" | ||
devices: {} | ||
timeout: 600 | ||
|
||
# lxc_config: | ||
# security.nesting=true | ||
# security.privileged=true | ||
# raw.lxc: |- | ||
# lxc.apparmor.profile=unconfined | ||
# lxc.cgroup.devices.allow=a |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep
zfsutils-linux
.