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
194d5010
Commit
194d5010
authored
Apr 22, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding play to set the hostname to the deploy host
parent
d7b11536
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
playbooks/edx-east/set_hostname.yml
+18
-0
util/jenkins/ansible-provision.sh
+3
-0
No files found.
playbooks/edx-east/set_hostname.yml
0 → 100644
View file @
194d5010
# This is a utility play to set a hostname
# on a server
-
name
:
Set hostname
hosts
:
all
sudo
:
True
gather_facts
:
False
tasks
:
-
fail
:
msg="you must pass a hostname_fqdn var into this play"
when
:
hostname_fqdn is not defined
-
name
:
Set hostname
hostname
:
name={{ hostname_fqdn.split('.')[0] }}
-
name
:
Update /etc/hosts
lineinfile
:
>
dest=/etc/hosts
regexp="^127\.0\.1\.1"
line="127.0.1.1{{'\t'}}{{ hostname_fqdn.split('.')[0] }}{{'\t'}}{{ hostname_fqdn }}{{'\t'}}localhost"
state=present
util/jenkins/ansible-provision.sh
View file @
194d5010
...
...
@@ -179,4 +179,7 @@ fi
# deploy the edx_ansible role
ansible-playbook edx_ansible.yml
-i
"
${
deploy_host
}
,"
-e
@
${
extra_vars_file
}
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/developer-sandbox.yml
--user
ubuntu
# set the hostname
ansible-playbook set_hostname.yml
-i
"
${
deploy_host
}
,"
-e
hostname_fqdn
=
${
deploy_host
}
--user
ubuntu
rm
-f
"
$extra_vars_file
"
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