Last active
April 10, 2019 19:42
-
-
Save yaxinr/788de9efb84951b9973684ffa455db2b to your computer and use it in GitHub Desktop.
bashrc systemctl alias
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: all | |
become: true | |
gather_facts: false | |
vars: | |
bashrc: /etc/bash.bashrc | |
tasks: | |
- name: alias to systemctl | |
lineinfile: | |
path: "{{ bashrc }}" | |
line: alias 'status'='sudo systemctl status' | |
create: true | |
- lineinfile: | |
path: "{{ bashrc }}" | |
line: alias 'start'='sudo systemctl start' | |
- lineinfile: | |
path: "{{ bashrc }}" | |
line: alias 'restart'='sudo systemctl restart' | |
- lineinfile: | |
path: "{{ bashrc }}" | |
line: alias 'stop'='sudo systemctl stop' | |
- lineinfile: | |
path: "{{ bashrc }}" | |
line: alias 'j'='sudo journalctl -u' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment