refactor(standardize): remove dead code, fix inconsistencies, update docs
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,3 +6,6 @@ vars.yml
|
|||||||
vars.yaml
|
vars.yaml
|
||||||
vars_kvm.yml
|
vars_kvm.yml
|
||||||
vars_libvirt.yml
|
vars_libvirt.yml
|
||||||
|
vars_proxmox.yml
|
||||||
|
|
||||||
|
.sisyphus/
|
||||||
|
|||||||
@@ -375,6 +375,7 @@ Use the bundled example files as starting points for new inventories:
|
|||||||
- `inventory_libvirt_example.yml` -- libvirt virtual setup
|
- `inventory_libvirt_example.yml` -- libvirt virtual setup
|
||||||
- `inventory_baremetal_example.yml` -- bare-metal physical setup
|
- `inventory_baremetal_example.yml` -- bare-metal physical setup
|
||||||
- `vars_example.yml` -- shared variable overrides
|
- `vars_example.yml` -- shared variable overrides
|
||||||
|
- `vars_baremetal_example.yml` -- bare-metal variable overrides
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Proxmox example
|
# Proxmox example
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
vars:
|
vars:
|
||||||
bootstrap_alpine_packages: >-
|
bootstrap_alpine_packages: >-
|
||||||
{{
|
{{
|
||||||
lookup('vars', 'bootstrap_alpine') | reject('equalto', '') | join(' ')
|
lookup('vars', bootstrap_var_key) | reject('equalto', '') | join(' ')
|
||||||
}}
|
}}
|
||||||
block:
|
block:
|
||||||
- name: Ensure chroot has resolv.conf
|
- name: Ensure chroot has resolv.conf
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
vars:
|
vars:
|
||||||
bootstrap_opensuse_packages: >-
|
bootstrap_opensuse_packages: >-
|
||||||
{{
|
{{
|
||||||
lookup('vars', 'bootstrap_opensuse') | reject('equalto', '') | join(' ')
|
lookup('vars', bootstrap_var_key) | reject('equalto', '') | join(' ')
|
||||||
}}
|
}}
|
||||||
block:
|
block:
|
||||||
- name: Ensure chroot has resolv.conf
|
- name: Ensure chroot has resolv.conf
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
vars:
|
vars:
|
||||||
bootstrap_void_packages: >-
|
bootstrap_void_packages: >-
|
||||||
{{
|
{{
|
||||||
lookup('vars', 'bootstrap_void') | reject('equalto', '') | join(' ')
|
lookup('vars', bootstrap_var_key) | reject('equalto', '') | join(' ')
|
||||||
}}
|
}}
|
||||||
block:
|
block:
|
||||||
- name: Ensure chroot has resolv.conf
|
- name: Ensure chroot has resolv.conf
|
||||||
|
|||||||
@@ -12,19 +12,19 @@
|
|||||||
net.ipv4.tcp_syncookies=1
|
net.ipv4.tcp_syncookies=1
|
||||||
net.ipv4.icmp_echo_ignore_broadcasts=1
|
net.ipv4.icmp_echo_ignore_broadcasts=1
|
||||||
net.ipv4.icmp_ignore_bogus_error_responses=1
|
net.ipv4.icmp_ignore_bogus_error_responses=1
|
||||||
net.ipv4.conf.all.log_martians = 1
|
net.ipv4.conf.all.log_martians=1
|
||||||
net.ipv4.conf.all.rp_filter = 1
|
net.ipv4.conf.all.rp_filter=1
|
||||||
net.ipv4.conf.all.secure_redirects = 0
|
net.ipv4.conf.all.secure_redirects=0
|
||||||
net.ipv4.conf.all.send_redirects = 0
|
net.ipv4.conf.all.send_redirects=0
|
||||||
net.ipv4.conf.all.accept_redirects = 0
|
net.ipv4.conf.all.accept_redirects=0
|
||||||
net.ipv4.conf.all.accept_source_route=0
|
net.ipv4.conf.all.accept_source_route=0
|
||||||
net.ipv4.conf.default.log_martians = 1
|
net.ipv4.conf.default.log_martians=1
|
||||||
net.ipv4.conf.default.rp_filter = 1
|
net.ipv4.conf.default.rp_filter=1
|
||||||
net.ipv4.conf.default.secure_redirects = 0
|
net.ipv4.conf.default.secure_redirects=0
|
||||||
net.ipv4.conf.default.send_redirects = 0
|
net.ipv4.conf.default.send_redirects=0
|
||||||
net.ipv4.conf.default.accept_redirects = 0
|
net.ipv4.conf.default.accept_redirects=0
|
||||||
net.ipv6.conf.all.accept_redirects = 0
|
net.ipv6.conf.all.accept_redirects=0
|
||||||
net.ipv6.conf.all.disable_ipv6 = 1
|
net.ipv6.conf.all.disable_ipv6=1
|
||||||
net.ipv6.conf.default.accept_redirects = 0
|
net.ipv6.conf.default.accept_redirects=0
|
||||||
net.ipv6.conf.default.disable_ipv6 = 1
|
net.ipv6.conf.default.disable_ipv6=1
|
||||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
net.ipv6.conf.lo.disable_ipv6=1
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
become: false
|
become: false
|
||||||
block:
|
block:
|
||||||
- name: Remove CD-ROM from VM in vCenter
|
- name: Remove CD-ROM from VM in vCenter
|
||||||
when: hypervisor_type == "vmware"
|
|
||||||
community.vmware.vmware_guest:
|
community.vmware.vmware_guest:
|
||||||
hostname: "{{ hypervisor_cfg.url }}"
|
hostname: "{{ hypervisor_cfg.url }}"
|
||||||
username: "{{ hypervisor_cfg.username }}"
|
username: "{{ hypervisor_cfg.username }}"
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
- name: Start VM in vCenter
|
- name: Start VM in vCenter
|
||||||
when: hypervisor_type == "vmware"
|
|
||||||
vmware.vmware.vm_powerstate:
|
vmware.vmware.vm_powerstate:
|
||||||
hostname: "{{ hypervisor_cfg.url }}"
|
hostname: "{{ hypervisor_cfg.url }}"
|
||||||
username: "{{ hypervisor_cfg.username }}"
|
username: "{{ hypervisor_cfg.username }}"
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
\^V//
|
|
||||||
|. .| I AM (G)ROOT!
|
|
||||||
- \ - / _
|
|
||||||
\_| |_/
|
|
||||||
\ \
|
|
||||||
__/_/__
|
|
||||||
|_______| With great power comes great responsibility.
|
|
||||||
\ / Use sudo wisely.
|
|
||||||
\___/
|
|
||||||
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
- name: Ensure hypervisor input is a dictionary
|
- name: Ensure hypervisor input is a dictionary
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
hypervisor: "{{ hypervisor | default({}) }}"
|
hypervisor: "{{ hypervisor | default({}) }}"
|
||||||
changed_when: false
|
|
||||||
|
|
||||||
- name: Validate hypervisor input
|
- name: Validate hypervisor input
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
@@ -19,4 +18,3 @@
|
|||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
hypervisor_cfg: "{{ merged }}"
|
hypervisor_cfg: "{{ merged }}"
|
||||||
hypervisor_type: "{{ merged.type | string | lower }}"
|
hypervisor_type: "{{ merged.type | string | lower }}"
|
||||||
changed_when: false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user