Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
917a30b9
Commit
917a30b9
authored
Nov 07, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving prompt default to the gh_users role
parent
ee372d1b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
89 deletions
+6
-89
playbooks/roles/common/defaults/main.yml
+0
-6
playbooks/roles/common/tasks/main.yml
+0
-4
playbooks/roles/common/templates/bash.bashrc.j2
+0
-76
playbooks/roles/common/templates/motd.tail.j2
+0
-1
playbooks/roles/gh_users/tasks/main.yml
+5
-0
util/jenkins/ansible-provision.sh
+1
-2
No files found.
playbooks/roles/common/defaults/main.yml
View file @
917a30b9
...
...
@@ -20,11 +20,6 @@ COMMON_PYPI_MIRROR_URL: 'https://pypi.python.org/simple'
COMMON_GIT_MIRROR
:
'
github.com'
# override this var to set a different hostname
COMMON_HOSTNAME
:
!!null
# 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_debian_pkgs
:
-
ack-grep
...
...
@@ -47,4 +42,3 @@ common_pip_pkgs:
common_web_user
:
www-data
common_web_group
:
www-data
common_log_user
:
syslog
common_update_bashrc
:
false
playbooks/roles/common/tasks/main.yml
View file @
917a30b9
...
...
@@ -60,7 +60,3 @@
shell
:
>
hostname -F /etc/hostname
when
:
COMMON_HOSTNAME and (etc_hosts.changed or etc_hostname.changed)
-
name
:
common | set global bashrc
template
:
src=bash.bashrc.j2 dest=/etc/bash.bashrc
when
:
common_update_bashrc
playbooks/roles/common/templates/bash.bashrc.j2
deleted
100644 → 0
View file @
ee372d1b
# {{ ansible_managed }}
# System-wide .bashrc file for interactive bash(1) shells.
# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, overwrite the one in /etc/profile)
PS1='{{ COMMON_PROMPT }}${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# enable bash completion in interactive shells
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# keep a full history log
if [ "$BASH_VERSINFO" -ge 2 ]; then
shopt -s cdspell
shopt -s checkwinsize
shopt -s cmdhist
shopt -s histappend
shopt -s checkhash
shopt -s no_empty_cmd_completion
shopt -s execfail
HISTFILESIZE=10000
HISTDIR="$HOME/.bash_histories/`uname -n`"
[[ ! -d $HISTDIR ]] && mkdir -p "$HISTDIR"
HISTFILE="$HISTDIR/`date +%Y_%m`"
# Suppress duplicates, bare "ls" and bg,fg and exit
HISTIGNORE="&:ls:[bf]g:exit"
fi
# sudo hint
if [ ! -e "$HOME/.sudo_as_admin_successful" ] && [ ! -e "$HOME/.hushlogin" ] ; then
case " $(groups) " in *\ admin\ *)
if [ -x /usr/bin/sudo ]; then
cat <<-EOF
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
EOF
fi
esac
fi
# if the command-not-found package is installed, use it
if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then
function command_not_found_handle {
# check because c-n-f could've been removed in the meantime
if [ -x /usr/lib/command-not-found ]; then
/usr/bin/python /usr/lib/command-not-found -- "$1"
return $?
elif [ -x /usr/share/command-not-found/command-not-found ]; then
/usr/bin/python /usr/share/command-not-found/command-not-found -- "$1"
return $?
else
printf "%s: command not found\n" "$1" >&2
return 127
fi
}
fi
playbooks/roles/common/templates/motd.tail.j2
deleted
100644 → 0
View file @
ee372d1b
# Welcome to the edX server
playbooks/roles/gh_users/tasks/main.yml
View file @
917a30b9
...
...
@@ -16,6 +16,11 @@
fail
:
msg="gh_users list must be defined for this parameterized role"
when
:
not gh_users
-
name
:
gh_users | creating default .bashrc
template
:
>
src=default.bashrc.j2 dest=/etc/skel/.bashrc
mode=0644 owner=root group=root
-
name
:
gh_users | create gh group
group
:
name=gh state=present
...
...
util/jenkins/ansible-provision.sh
View file @
917a30b9
...
...
@@ -94,8 +94,7 @@ gh_users:
-
${
github_username
}
dns_zone:
$dns_zone
rabbitmq_refresh: True
common_update_bashrc: true
COMMON_PROMPT: '[
$name_tag
] '
GH_USERS_PROMPT: '[
$name_tag
] '
EOF
cat
$extra_vars
# run the tasks to launch an ec2 instance from AMI
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment