pve: source bashrc
This commit is contained in:
		@@ -74,7 +74,22 @@ function off {
 | 
			
		||||
	updl
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
alias h="echo 'avail cmds: updl upg upgr | localprogress'"
 | 
			
		||||
function _on {
 | 
			
		||||
	ha-manager crm-command node-maintenance disable "$1" && \
 | 
			
		||||
	echo "$1": normal mode
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=SC2120
 | 
			
		||||
function off {
 | 
			
		||||
	if [[ "$#" -gt 0 ]]; then
 | 
			
		||||
		_on "$@"
 | 
			
		||||
		return "$?"
 | 
			
		||||
	else
 | 
			
		||||
		_on "$HOSTNAME"
 | 
			
		||||
	fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
alias h="echo 'avail cmds: off on | updl upg upgr | localprogress'"
 | 
			
		||||
 | 
			
		||||
function localprogress () {
 | 
			
		||||
	watch ls -lh "/var/lib/vz/images/$1"
 | 
			
		||||
 
 | 
			
		||||
@@ -57,11 +57,11 @@
 | 
			
		||||
        regexp: 'WATCHDOG_MODULE=ipmi_watchdog$'
 | 
			
		||||
        line: 'WATCHDOG_MODULE=ipmi_watchdog'
 | 
			
		||||
 | 
			
		||||
    - name: rpool dedup get
 | 
			
		||||
    - name: rpool dedup
 | 
			
		||||
      ansible.builtin.shell: "zfs get dedup rpool -H | awk '{ print $3 }'"
 | 
			
		||||
      changed_when: false
 | 
			
		||||
      register: dedup
 | 
			
		||||
    - name: rpool dedup set on
 | 
			
		||||
    - name: rpool dedup=on
 | 
			
		||||
      when: "dedup.stdout != 'on'"
 | 
			
		||||
      ansible.builtin.shell: zfs set dedup=on rpool
 | 
			
		||||
 | 
			
		||||
@@ -86,6 +86,7 @@
 | 
			
		||||
      ansible.builtin.copy:
 | 
			
		||||
        content: |
 | 
			
		||||
          https://git.k-space.ee/k-space/ansible/src/branch/main/proxmox
 | 
			
		||||
          ^ source for admin_scritps
 | 
			
		||||
          https://wiki.k-space.ee/en/hosting/proxmox
 | 
			
		||||
        dest: /root/README
 | 
			
		||||
    - name: admin_scripts directory
 | 
			
		||||
@@ -93,6 +94,10 @@
 | 
			
		||||
        src: admin_scripts/
 | 
			
		||||
        dest: /root/admin_scripts/
 | 
			
		||||
        mode: preserve
 | 
			
		||||
    - name: source admin_scripts/bashrc
 | 
			
		||||
      ansible.builtin.lineinfile:
 | 
			
		||||
        path: /root/.bashrc
 | 
			
		||||
        line: 'source /root/admin_scripts/bashrc'
 | 
			
		||||
 | 
			
		||||
    - name: load secrets
 | 
			
		||||
      ansible.builtin.include_vars:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user