Renamed playbook
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
			
		||||
---
 | 
			
		||||
- name: admin_login
 | 
			
		||||
- name: init_login
 | 
			
		||||
  hosts: servers # @NOTE for IPv6, switch to 'servers6' instead of 'servers4'--for both, 'servers'
 | 
			
		||||
  vars_files:
 | 
			
		||||
    # @NOTE if second line is uncommented with its variables actively in use, first line should too be uncommented
 | 
			
		||||
@@ -24,4 +24,49 @@
 | 
			
		||||
        handlers_from: main
 | 
			
		||||
        tasks_from: deshell
 | 
			
		||||
        apply:
 | 
			
		||||
          become: yes
 | 
			
		||||
          become: yes
 | 
			
		||||
    - name: Create global bash aliases
 | 
			
		||||
      become: yes
 | 
			
		||||
      ansible.builtin.copy:
 | 
			
		||||
        src: files/all/bash/bash_aliases
 | 
			
		||||
        dest: "/etc/bash_aliases"
 | 
			
		||||
        owner: root
 | 
			
		||||
        group: root
 | 
			
		||||
        follow: yes
 | 
			
		||||
        force: yes
 | 
			
		||||
        backup: yes
 | 
			
		||||
        mode: "0644"
 | 
			
		||||
        state: present
 | 
			
		||||
    - name: Create global bash functions
 | 
			
		||||
      become: yes
 | 
			
		||||
      ansible.builtin.copy:
 | 
			
		||||
        src: files/all/bash/bash_functions
 | 
			
		||||
        dest: "/etc/bash_functions"
 | 
			
		||||
        owner: root
 | 
			
		||||
        group: root
 | 
			
		||||
        follow: yes
 | 
			
		||||
        force: yes
 | 
			
		||||
        backup: yes
 | 
			
		||||
        mode: "0644"
 | 
			
		||||
        state: present
 | 
			
		||||
    - name: Register bash aliases and functions to global bashrc
 | 
			
		||||
      become: yes
 | 
			
		||||
      ansible.builtin.blockinfile:
 | 
			
		||||
        block: |
 | 
			
		||||
          if [ -f /etc/bash_aliases ]; then
 | 
			
		||||
              . /etc/bash_aliases
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          if [ -f /etc/bash_functions ]; then
 | 
			
		||||
              . /etc/bash_functions
 | 
			
		||||
          fi
 | 
			
		||||
        path: "/etc/bash.bashrc"
 | 
			
		||||
        prepend_newline: yes
 | 
			
		||||
        marker: "# {mark} ANSIBLE MANAGED SYSTEM-WIDE BASH ALIASES AND FUNCTIONS BLOCK"
 | 
			
		||||
        insertafter: EOF
 | 
			
		||||
        create: yes
 | 
			
		||||
        owner: root
 | 
			
		||||
        group: root
 | 
			
		||||
        backup: yes
 | 
			
		||||
        state: present
 | 
			
		||||
        
 | 
			
		||||
		Reference in New Issue
	
	Block a user