Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
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
OpenEdx
ansible
Commits
9caa93c1
Commit
9caa93c1
authored
Jul 18, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about useful quote filter.
parent
cc6ad405
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
docsite/rst/guide_rolling_upgrade.rst
+4
-4
library/commands/shell
+3
-0
No files found.
docsite/rst/guide_rolling_upgrade.rst
View file @
9caa93c1
...
@@ -207,12 +207,12 @@ Here is the next part of the update play::
...
@@ -207,12 +207,12 @@ Here is the next part of the update play::
pre_tasks:
pre_tasks:
- name: disable nagios alerts for this host webserver service
- name: disable nagios alerts for this host webserver service
nagios: action=disable_alerts host={{
ansible
_hostname }} services=webserver
nagios: action=disable_alerts host={{
inventory
_hostname }} services=webserver
delegate_to: "{{ item }}"
delegate_to: "{{ item }}"
with_items: groups.monitoring
with_items: groups.monitoring
- name: disable the server in haproxy
- name: disable the server in haproxy
shell: echo "disable server myapplb/{{
ansible
_hostname }}" | socat stdio /var/lib/haproxy/stats
shell: echo "disable server myapplb/{{
inventory
_hostname }}" | socat stdio /var/lib/haproxy/stats
delegate_to: "{{ item }}"
delegate_to: "{{ item }}"
with_items: groups.lbservers
with_items: groups.lbservers
...
@@ -233,12 +233,12 @@ Finally, in the ``post_tasks`` section, we reverse the changes to the Nagios con
...
@@ -233,12 +233,12 @@ Finally, in the ``post_tasks`` section, we reverse the changes to the Nagios con
post_tasks:
post_tasks:
- name: Enable the server in haproxy
- name: Enable the server in haproxy
shell: echo "enable server myapplb/{{
ansible
_hostname }}" | socat stdio /var/lib/haproxy/stats
shell: echo "enable server myapplb/{{
inventory
_hostname }}" | socat stdio /var/lib/haproxy/stats
delegate_to: "{{ item }}"
delegate_to: "{{ item }}"
with_items: groups.lbservers
with_items: groups.lbservers
- name: re-enable nagios alerts
- name: re-enable nagios alerts
nagios: action=enable_alerts host={{
ansible
_hostname }} services=webserver
nagios: action=enable_alerts host={{
inventory
_hostname }} services=webserver
delegate_to: "{{ item }}"
delegate_to: "{{ item }}"
with_items: groups.monitoring
with_items: groups.monitoring
...
...
library/commands/shell
View file @
9caa93c1
...
@@ -47,6 +47,9 @@ notes:
...
@@ -47,6 +47,9 @@ notes:
playbooks will follow the trend of using M(command) unless M(shell) is
playbooks will follow the trend of using M(command) unless M(shell) is
explicitly required. When running ad-hoc commands, use your best
explicitly required. When running ad-hoc commands, use your best
judgement.
judgement.
- To sanitize any variables passed to the shell module, you should use
"{{ var | quote }}" instead of just "{{ var }}" to make sure they don't include evil things like semicolons.
requirements: [ ]
requirements: [ ]
author: Michael DeHaan
author: Michael DeHaan
'''
'''
...
...
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