ZFS, NFS, Zeus setting, perma IP fix, again
This commit is contained in:
16
proxmox.yml
Normal file
16
proxmox.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Init for proxmox
|
||||
hosts: proxmox
|
||||
become: true
|
||||
vars:
|
||||
user: warezjoe
|
||||
uid: 1000
|
||||
user_ssh_key_url: https://github.com/MatousVondrejka.keys
|
||||
host: herodes # desktop rpi ntb
|
||||
set_ip: true # false
|
||||
ip: 192.168.5.6
|
||||
roles:
|
||||
# - role: proxmox
|
||||
# - role: linux_config_init
|
||||
- role: tools_for_command_line
|
||||
# - role: ansible-role-security
|
||||
1
roles/ansible-role-security
Submodule
1
roles/ansible-role-security
Submodule
Submodule roles/ansible-role-security added at 4700aefc74
40
roles/linux_config_init/tasks/create_user.yml
Normal file
40
roles/linux_config_init/tasks/create_user.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
- name: Adding group
|
||||
ansible.builtin.group:
|
||||
name: "{{ user }}"
|
||||
state: present
|
||||
gid: "{{ uid }}"
|
||||
|
||||
- name: Adding user
|
||||
ansible.builtin.user:
|
||||
name: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
uid: "{{ uid }}"
|
||||
shell: /bin/bash
|
||||
groups: sudo
|
||||
|
||||
- name: Dowload ssh key
|
||||
ansible.builtin.uri:
|
||||
url: "{{ user_ssh_key_url }}"
|
||||
method: GET
|
||||
return_content: true
|
||||
register: ssh_key
|
||||
|
||||
- name: Setting ssh key
|
||||
ansible.builtin.blockinfile:
|
||||
state: present
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
insertafter: EOF
|
||||
path: /home/{{ user }}/.ssh/authorized_keys
|
||||
mode: '0644'
|
||||
create: true
|
||||
block: |
|
||||
{{ ssh_key.content }}
|
||||
|
||||
- name: Set permissions to .ssh folder
|
||||
ansible.builtin.file:
|
||||
path: /home/{{ user }}/.ssh
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
mode: '0711'
|
||||
10
roles/linux_config_init/templates/etc_hosts
Normal file
10
roles/linux_config_init/templates/etc_hosts
Normal file
@@ -0,0 +1,10 @@
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
{{ ip }} {{ host }}
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
ff02::3 ip6-allhosts
|
||||
15
roles/linux_config_init/templates/etc_network_interface
Normal file
15
roles/linux_config_init/templates/etc_network_interface
Normal file
@@ -0,0 +1,15 @@
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
iface {{ in_face }} inet manual
|
||||
ethernet-wol g
|
||||
auto vmbr0
|
||||
iface vmbr0 inet static
|
||||
address {{ ip }}/24
|
||||
gateway 192.168.5.1
|
||||
bridge-ports {{ in_face }}
|
||||
bridge-stp off
|
||||
bridge-fd 0
|
||||
|
||||
|
||||
source /etc/network/interfaces.d/*
|
||||
29
roles/nfs-share/.travis.yml
Normal file
29
roles/nfs-share/.travis.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
38
roles/nfs-share/README.md
Normal file
38
roles/nfs-share/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
2
roles/nfs-share/defaults/main.yml
Normal file
2
roles/nfs-share/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for nfs-share
|
||||
2
roles/nfs-share/handlers/main.yml
Normal file
2
roles/nfs-share/handlers/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for nfs-share
|
||||
52
roles/nfs-share/meta/main.yml
Normal file
52
roles/nfs-share/meta/main.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
22
roles/nfs-share/tasks/main.yml
Normal file
22
roles/nfs-share/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Nfs install for Debian
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- nfs-kernel-server
|
||||
state: present
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Nfs install for RedHat
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- nfs-utils
|
||||
state: present
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: Start and enable nfs
|
||||
ansible.builtin.service:
|
||||
name: nfs-server
|
||||
state: started
|
||||
enabled: yes
|
||||
2
roles/nfs-share/tests/inventory
Normal file
2
roles/nfs-share/tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
roles/nfs-share/tests/test.yml
Normal file
5
roles/nfs-share/tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- nfs-share
|
||||
2
roles/nfs-share/vars/main.yml
Normal file
2
roles/nfs-share/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for nfs-share
|
||||
29
roles/proxmox/.travis.yml
Normal file
29
roles/proxmox/.travis.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
38
roles/proxmox/README.md
Normal file
38
roles/proxmox/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
2
roles/proxmox/defaults/main.yml
Normal file
2
roles/proxmox/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for proxmox
|
||||
4
roles/proxmox/handlers/main.yml
Normal file
4
roles/proxmox/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
# handlers file for proxmox
|
||||
- name: iommu-grub-update
|
||||
ansible.builtin.command: update-grub
|
||||
52
roles/proxmox/meta/main.yml
Normal file
52
roles/proxmox/meta/main.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
17
roles/proxmox/tasks/iommu.yml
Normal file
17
roles/proxmox/tasks/iommu.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Copy to /etc/default/grub
|
||||
template:
|
||||
src: ../templates/grub
|
||||
dest: /etc/default/grub
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
notify: iommu-grub-update
|
||||
|
||||
- name: Copy to /etc/modules
|
||||
template:
|
||||
src: ../templates/modules
|
||||
dest: /etc/modules
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
8
roles/proxmox/tasks/main.yml
Normal file
8
roles/proxmox/tasks/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# tasks file for proxmox
|
||||
- name: System settings
|
||||
ansible.builtin.include_tasks: "{{ item }}"
|
||||
loop:
|
||||
- set_community_repo.yml
|
||||
- iommu.yml
|
||||
|
||||
23
roles/proxmox/tasks/set_community_repo.yml
Normal file
23
roles/proxmox/tasks/set_community_repo.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: setting community repo
|
||||
ansible.builtin.blockinfile:
|
||||
state: present
|
||||
insertafter: EOF
|
||||
path: /etc/apt/sources.list
|
||||
mode: '0664'
|
||||
create: true
|
||||
block: |
|
||||
#Block for setting community repo
|
||||
deb http://download.proxmox.com/debian/ {{ ansible_distribution_release }} pve-no-subscription
|
||||
|
||||
- name: disable comercial one
|
||||
file: path=/etc/apt/sources.list.d/pve-enterprise.list state=absent
|
||||
|
||||
- name: disable comercial two
|
||||
file: path=/etc/apt/sources.list.d/ceph.list state=absent
|
||||
|
||||
- name: Update and upgrade apt packages
|
||||
apt:
|
||||
upgrade: yes
|
||||
update_cache: yes
|
||||
|
||||
41
roles/proxmox/templates/grub
Normal file
41
roles/proxmox/templates/grub
Normal file
@@ -0,0 +1,41 @@
|
||||
#MODIFIED VIA ANSIBLE
|
||||
|
||||
# If you change this file, run 'update-grub' afterwards to update
|
||||
# /boot/grub/grub.cfg.
|
||||
# For full documentation of the options in this file, see:
|
||||
# info -f grub -n 'Simple configuration'
|
||||
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
|
||||
# If your computer has multiple operating systems installed, then you
|
||||
# probably want to run os-prober. However, if your computer is a host
|
||||
# for guest OSes installed via LVM or raw disk devices, running
|
||||
# os-prober can cause damage to those guest OSes as it mounts
|
||||
# filesystems to look for things.
|
||||
#GRUB_DISABLE_OS_PROBER=false
|
||||
|
||||
# Uncomment to enable BadRAM filtering, modify to suit your needs
|
||||
# This works with Linux (no patch required) and with any kernel that obtains
|
||||
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
|
||||
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
|
||||
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL=console
|
||||
|
||||
# The resolution used on graphical terminal
|
||||
# note that you can use only modes which your graphic card supports via VBE
|
||||
# you can see them in real GRUB with the command `vbeinfo'
|
||||
#GRUB_GFXMODE=640x480
|
||||
|
||||
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
|
||||
# Uncomment to disable generation of recovery mode menu entries
|
||||
#GRUB_DISABLE_RECOVERY="true"
|
||||
|
||||
# Uncomment to get a beep at grub start
|
||||
#GRUB_INIT_TUNE="480 440 1"
|
||||
12
roles/proxmox/templates/modules
Normal file
12
roles/proxmox/templates/modules
Normal file
@@ -0,0 +1,12 @@
|
||||
#MODIFIED VIA ANSIBLE
|
||||
|
||||
# /etc/modules: kernel modules to load at boot time.
|
||||
#
|
||||
# This file contains the names of kernel modules that should be loaded
|
||||
# at boot time, one per line. Lines beginning with "#" are ignored.
|
||||
# Parameters can be specified after the module name.
|
||||
|
||||
vfio
|
||||
vfio_iommu_type1
|
||||
vfio_pci
|
||||
vfio_virqfd
|
||||
2
roles/proxmox/tests/inventory
Normal file
2
roles/proxmox/tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
roles/proxmox/tests/test.yml
Normal file
5
roles/proxmox/tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- proxmox
|
||||
2
roles/proxmox/vars/main.yml
Normal file
2
roles/proxmox/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for proxmox
|
||||
29
roles/zfs-install/.travis.yml
Normal file
29
roles/zfs-install/.travis.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
language: python
|
||||
python: "2.7"
|
||||
|
||||
# Use the new container infrastructure
|
||||
sudo: false
|
||||
|
||||
# Install ansible
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
- pip install ansible
|
||||
|
||||
# Check ansible version
|
||||
- ansible --version
|
||||
|
||||
# Create ansible.cfg with correct roles_path
|
||||
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||
|
||||
script:
|
||||
# Basic role syntax check
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
38
roles/zfs-install/README.md
Normal file
38
roles/zfs-install/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
Role Name
|
||||
=========
|
||||
|
||||
A brief description of the role goes here.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
|
||||
|
||||
- hosts: servers
|
||||
roles:
|
||||
- { role: username.rolename, x: 42 }
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
|
||||
2
roles/zfs-install/defaults/main.yml
Normal file
2
roles/zfs-install/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for zfs-install
|
||||
2
roles/zfs-install/handlers/main.yml
Normal file
2
roles/zfs-install/handlers/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for zfs-install
|
||||
52
roles/zfs-install/meta/main.yml
Normal file
52
roles/zfs-install/meta/main.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
galaxy_info:
|
||||
author: your name
|
||||
description: your role description
|
||||
company: your company (optional)
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: license (GPL-2.0-or-later, MIT, etc)
|
||||
|
||||
min_ansible_version: 2.1
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
# platforms:
|
||||
# - name: Fedora
|
||||
# versions:
|
||||
# - all
|
||||
# - 25
|
||||
# - name: SomePlatform
|
||||
# versions:
|
||||
# - all
|
||||
# - 1.0
|
||||
# - 7
|
||||
# - 99.99
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
23
roles/zfs-install/tasks/main.yml
Normal file
23
roles/zfs-install/tasks/main.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# tasks file for zfs-install
|
||||
- name: Set on Contrib for Debian
|
||||
apt_repository:
|
||||
repo: deb http://deb.debian.org/debian {{ ansible_distribution_release }} contrib
|
||||
state: present
|
||||
filename: contrib
|
||||
update_cache: true
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: Zfs isntall
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- zfsutils-linux
|
||||
- linux-headers-amd64
|
||||
- zfs-dkms
|
||||
- zfs-zed
|
||||
state: present
|
||||
|
||||
- name: Add the zfs module
|
||||
community.general.modprobe:
|
||||
name: zfs
|
||||
2
roles/zfs-install/tests/inventory
Normal file
2
roles/zfs-install/tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
roles/zfs-install/tests/test.yml
Normal file
5
roles/zfs-install/tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- zfs-install
|
||||
2
roles/zfs-install/vars/main.yml
Normal file
2
roles/zfs-install/vars/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# vars file for zfs-install
|
||||
16
universal.yml
Normal file
16
universal.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: And now all running
|
||||
hosts: mintotaur
|
||||
vars:
|
||||
user: warezjoe
|
||||
host: ntb # desktop rpi ntb
|
||||
set_ip: true # false
|
||||
ip: 192.168.5.5
|
||||
roles:
|
||||
- role: linux_config_init
|
||||
- role: import_ssh_key # without sudo
|
||||
- role: tools_for_command_line
|
||||
# - role: service_start
|
||||
# - role: gui_app_init
|
||||
# - role: ansible-role-docker
|
||||
# docker_users: "{{ user }}"
|
||||
17
zeus.yml
Normal file
17
zeus.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
- name: Init for zeus
|
||||
hosts: zeus
|
||||
become: true
|
||||
vars:
|
||||
user: warezjoe
|
||||
uid: 1000
|
||||
user_ssh_key_url: https://github.com/MatousVondrejka.keys
|
||||
host: zeus
|
||||
set_ip: true # false
|
||||
in_face: ens18
|
||||
ip: 192.168.5.7
|
||||
roles:
|
||||
- role: linux_config_init
|
||||
- role: tools_for_command_line
|
||||
- role: ansible-role-security
|
||||
- role: zfs-install
|
||||
- role: nfs-share
|
||||
Reference in New Issue
Block a user