From 8a29978386af30c0bb8833716a7889d9527ff246 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Wed, 31 Jul 2024 21:01:17 -0400 Subject: [PATCH] add alias, fix apt playbook --- ansible/playbooks/alias.yml | 15 +++++++++++++++ ansible/playbooks/apt.yml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 ansible/playbooks/alias.yml diff --git a/ansible/playbooks/alias.yml b/ansible/playbooks/alias.yml new file mode 100644 index 0000000..4d46e62 --- /dev/null +++ b/ansible/playbooks/alias.yml @@ -0,0 +1,15 @@ +--- +- hosts: all + become: true + tasks: + - name: Add alias for docker compose up -d in .bashrc + lineinfile: + path: "/home/{{ ansible_user }}/.bashrc" + line: "alias dcu='docker compose up -d'" + state: present + + - name: Add alias for docker compose down in .bashrc + lineinfile: + path: "/home/{{ ansible_user }}/.bashrc" + line: "alias dcd='docker compose down'" + state: present \ No newline at end of file diff --git a/ansible/playbooks/apt.yml b/ansible/playbooks/apt.yml index 05311be..673acbe 100644 --- a/ansible/playbooks/apt.yml +++ b/ansible/playbooks/apt.yml @@ -1,5 +1,5 @@ - hosts: "*" - become: yes + become: true tasks: - name: apt apt: