Add a prod
alias similar to how the env-termux
project does it.
This commit is contained in:
parent
76ec891138
commit
db3e610c91
@ -35,11 +35,11 @@
|
||||
;
|
||||
; user : Provide the name of the user account.
|
||||
; Example: tom, jerry, kim, sarah
|
||||
; Default: ling
|
||||
; Default: user
|
||||
;
|
||||
; user_desc : Provide the description of the user account.
|
||||
; Example: Thomas, Jerry, Kimberly, Sarah
|
||||
; Default: Hyperling
|
||||
; Default: User
|
||||
;
|
||||
; sshd_port : Determine the port which SSHD should listen on.
|
||||
; Example: 12345
|
||||
@ -101,6 +101,22 @@
|
||||
; Slows down the rate of services such as telegraf and cron.
|
||||
; Default: false
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;; Server Shortcut ;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; For typing `prod` and getting straight to a server, like in env-termux.
|
||||
;
|
||||
; prod_host : Branch to use on this machine.
|
||||
; Example: myserver.com, mywebhost.net
|
||||
; Default: hyperling.com
|
||||
;
|
||||
; prod_port : Provide the git host that the machine should poll.
|
||||
; Example: 22, 222, 2222
|
||||
; Default: 22
|
||||
;
|
||||
; prod_user : Port of the server host to use for SSH requests.
|
||||
; Example: jim, bob, jeff, anne
|
||||
; Default: user
|
||||
;
|
||||
[global]
|
||||
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
|
||||
state: present
|
||||
@ -124,6 +140,9 @@
|
||||
git_user: "{{ lookup('ini', 'git_user file={{gen_file}} default=me') }}"
|
||||
git_project: "{{ lookup('ini', 'git_project file={{gen_file}} default=env-ansible') }}"
|
||||
git_ssh_port: "{{ lookup('ini', 'git_ssh_port file={{gen_file}} default=22') }}"
|
||||
prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}"
|
||||
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') }}"
|
||||
prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}"
|
||||
|
||||
- name: General | Account Management | Provisioning Configuration | General | List
|
||||
set_fact:
|
||||
@ -144,6 +163,9 @@
|
||||
- { 'git_user': "{{ git_user }}" }
|
||||
- { 'git_project': "{{ git_project }}" }
|
||||
- { 'git_ssh_port': "{{ git_ssh_port }}" }
|
||||
- { 'prod_host': "{{ prod_host }}" }
|
||||
- { 'prod_port': "{{ prod_port }}" }
|
||||
- { 'prod_user': "{{ prod_user }}" }
|
||||
|
||||
|
||||
## Workstation ##
|
||||
|
@ -558,6 +558,8 @@
|
||||
fi
|
||||
alias_scan: |
|
||||
alias scan="nmap -A -p- --script=vuln"
|
||||
alias_prod: |
|
||||
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
set_fact:
|
||||
@ -599,6 +601,7 @@
|
||||
{{ export_hyperling }}
|
||||
{{ source_docker_env }}
|
||||
{{ alias_scan }}
|
||||
{{ alias_prod }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .bashrc
|
||||
blockinfile:
|
||||
|
Loading…
x
Reference in New Issue
Block a user