From 164f81d8d4e1b8d91c63ade8b8fb2cc9c9d35687 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 7 Feb 2021 06:22:49 -0600 Subject: [PATCH] More blockinfile's. --- tasks/freebsd/software/gui.yml | 13 +++++++++++-- tasks/general/acct_mgmt/users.yml | 14 +++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tasks/freebsd/software/gui.yml b/tasks/freebsd/software/gui.yml index 140e922..7bcb74d 100644 --- a/tasks/freebsd/software/gui.yml +++ b/tasks/freebsd/software/gui.yml @@ -34,7 +34,7 @@ path: /etc/fstab regexp: '^proc' line: proc /proc procfs rw 0 0 - state: present + state: absent backup: yes - name: Workstation | FreeBSD | GUI | Create proc fstab Comment @@ -42,9 +42,18 @@ path: /etc/fstab regexp: '^# MANAGED BY ANSIBLE | Leet Share' line: '# MANAGED BY ANSIBLE | Leet Share' - state: present + state: absent insertbefore: '^proc' +- name: Workstation | FreeBSD | GUI | Create fstab Entries + blockinfile: + path: /etc/fstab + block: | + proc /proc procfs rw 0 0 + marker: '# {mark} MANAGED BY ANSIBLE | GUI Components' + state: present + backup: yes + - name: Workstation | FreeBSD | GUI | Mount All shell: mount -a args: diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index f0e7287..fac1307 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -23,9 +23,21 @@ #password: "{{ ling_passwd }}" register: user_ling -- name: General | Account Management | User | Hyperling TRASH Folder +- name: General | Account Management | User | Hyperling | TRASH Folder file: path: "{{ user_ling.home }}/TRASH" state: directory mode: '0755' + when: user_ling.home != "" + +- name: General | Account Management | User | Hyperling | .bashrc Entries + blockinfile: + path: "{{ user_ling.home }}/.bashrc" + block: | + alias cp='cp -v' + alias mv='mv -v' + alias rm='echo "Use mv ~/TRASH/ instead!' + marker: '# {mark} MANAGED BY ANSIBLE | Aliases' + state: present + backup: yes when: user_ling.home != "" \ No newline at end of file