Commit f99404dd by John Jarvis

using var for global bashrc update

parent 018e6887
...@@ -21,6 +21,8 @@ COMMON_GIT_MIRROR: 'github.com' ...@@ -21,6 +21,8 @@ COMMON_GIT_MIRROR: 'github.com'
# override this var to set a different hostname # override this var to set a different hostname
COMMON_HOSTNAME: !!null COMMON_HOSTNAME: !!null
# override this var to add a prefix to the prompt # override this var to add a prefix to the prompt
# also need to set commont_update_bashrc for to
# update the system bashrc default
COMMON_PROMPT: "" COMMON_PROMPT: ""
...@@ -45,3 +47,4 @@ common_pip_pkgs: ...@@ -45,3 +47,4 @@ common_pip_pkgs:
common_web_user: www-data common_web_user: www-data
common_web_group: www-data common_web_group: www-data
common_log_user: syslog common_log_user: syslog
common_update_bashrc: false
...@@ -63,3 +63,4 @@ ...@@ -63,3 +63,4 @@
- name: common | set global bashrc - name: common | set global bashrc
template: src=bash.bashrc.j2 dest=/etc/bash.bashrc template: src=bash.bashrc.j2 dest=/etc/bash.bashrc
when: common_update_bashrc
...@@ -18,7 +18,7 @@ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then ...@@ -18,7 +18,7 @@ if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
fi fi
# set a fancy prompt (non-color, overwrite the one in /etc/profile) # set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='{{ hostname_prompt }}${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' PS1='{{ COMMON_PROMPT }}${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# enable bash completion in interactive shells # enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
......
...@@ -94,6 +94,8 @@ gh_users: ...@@ -94,6 +94,8 @@ gh_users:
- ${github_username} - ${github_username}
dns_zone: $dns_zone dns_zone: $dns_zone
rabbitmq_refresh: True rabbitmq_refresh: True
common_update_bashrc: true
COMMON_PROMPT: '[$name_tag] '
EOF EOF
cat $extra_vars cat $extra_vars
# run the tasks to launch an ec2 instance from AMI # run the tasks to launch an ec2 instance from AMI
......
...@@ -28,4 +28,5 @@ ease_version: $ease_version ...@@ -28,4 +28,5 @@ ease_version: $ease_version
rabbitmq_ip: "127.0.0.1" rabbitmq_ip: "127.0.0.1"
rabbitmq_refresh: True rabbitmq_refresh: True
common_hostname: edx-server
EOF EOF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment