WIP3
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<section>
|
||||
|
||||
<section data-state="title alt" id="RedIntro-AnsibleVault">
|
||||
<h1>ANSIBLE VAULT: <br/>ENCRYPTION</h1>
|
||||
<p>Using ansible-vault to keep your secrets a secret.</p><br>
|
||||
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<aside class="notes">
|
||||
<p>Ansible includes a very powerful encryption method for times when you need to include sensitive information in a playbook in an encrypted format.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<section id="VaultTwoTypes">
|
||||
<center>
|
||||
<h1>ANSIBLE VAULT</h1>
|
||||
<p>Encrypt an entire file or just a string inside a non-encrypted file.</p>
|
||||
</center>
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal : Encrypted File</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> cat ronin_secret.yml
|
||||
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
61336361663664353737663637366334383030393736353532345
|
||||
66532383233393438653965633333326632363935663132326163
|
||||
306637626335643365630a653066396533313738316266653
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal : Encrypted Variable</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> cat fonzie_secret.yml
|
||||
|
||||
fonzie_show: Happy Days
|
||||
fonzie_secret: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
6632363237353065633237633937353164646564633
|
||||
6376461326235386539663733343539666234332664
|
||||
6664616266316339383838373734653364346163633
|
||||
6663864366534633063303062363238393139
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<aside class="notes">
|
||||
<p>We can encrypt an entire file or just a string inside an encrypted file.</p>
|
||||
<p>We'll call the FULL FILE ENCRYPTION in this example, "Ronin".</p>
|
||||
<p>We'll call the ENCRYPTED STRING in a plain-text file, "Fonzie"</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<section>
|
||||
|
||||
<section data-state="title alt" id="RedIntro-AnsibleVault-Ronin">
|
||||
<h1>ANSIBLE VAULT: <br/>ENCRYPTED FILE EXAMPLE</h1>
|
||||
<p>(Variables In An Encrypted File)</p><br>
|
||||
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<p>Encrypting Sensitive Variables Inside Your Playbooks With An Entire Encrypted YAML File</p>
|
||||
<aside class="notes">
|
||||
<p>Ansible includes a very powerful encryption method for times when you need to include sensitive information in a playbook in an encrypted format.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<section id="VaultInitRonin01">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Encrypting an entire file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault create ronin_secret.yml
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="VaultInitRonin02">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Encrypting an entire file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault create ronin_secret.yml
|
||||
|
||||
New Vault password: <font color="red">redhat</font><img src="images/passwordkey.png">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="VaultInitRonin03">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Encrypting an entire file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault create ronin_secret.yml
|
||||
|
||||
New Vault password:
|
||||
Confirm New Vault password:
|
||||
|
||||
<font color="#FF00FF">[WARNING]: does not exist, creating...</font>
|
||||
|
||||
<font color="gray"><?=$terminal_prompt?></font>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<section id="VaultEditRonin01">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Editing an encrypted file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault edit ronin_secret.yml
|
||||
|
||||
Vault password: <font color="red">redhat</font><img src="images/passwordkey.png">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="VaultEditRonin02">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Editing an encrypted file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
"/tmp/tmpQD4uZF.yml" 0L, 0C</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>This example demonstrates a basic loop with <code>with_items</code>. The loop sets a variable called "item", a template variable courtesy of the embedded Jinja2 template engine, with the list value that is in context.</p>
|
||||
<p>There are many different and specialized types of task loops to work with. See the <a href="http://docs.ansible.com/ansible/playbooks_loops.html">Loops documentation</a> to go deeper.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
<section id="VaultEditRonin03">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Editing an encrypted file with Ansible Vault.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
movie_title: Ronin
|
||||
movie_phrase: <mark>'Whenever there is any doubt, there is no doubt'</mark>
|
||||
movie_actor: Robert De Niro
|
||||
movie_character: Sam
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
<font color="blue">~</font>
|
||||
:wq</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>This example demonstrates a basic loop with <code>with_items</code>. The loop sets a variable called "item", a template variable courtesy of the embedded Jinja2 template engine, with the list value that is in context.</p>
|
||||
<p>There are many different and specialized types of task loops to work with. See the <a href="http://docs.ansible.com/ansible/playbooks_loops.html">Loops documentation</a> to go deeper.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<section id="VaultViewRonin01">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Viewing an encrypted file with Ansible Vault without the password.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> cat ronin_secret.yml
|
||||
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
6133636166366435373766363736633438303039373635353234
|
||||
6465306431313861616533653164373061323463356238323530
|
||||
6363383735336661323964330a30303730383863656633613862
|
||||
3339653531346137643334616664366532383233393438653965
|
||||
633333326632363935663132326163306637626335643365630a
|
||||
6530663965333137383162666538303062386539356366313237
|
||||
633531363239
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="VaultViewRonin02">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Viewing an encrypted file with Ansible Vault with the password.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault view ronin_secret.yml
|
||||
|
||||
Vault password: <font color="red">redhat</font>
|
||||
|
||||
movie_title: Ronin
|
||||
movie_phrase: <mark>'Whenever there is any doubt, there is no doubt'</mark>
|
||||
movie_actor: Robert De Niro
|
||||
movie_character: Sam
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<section id="VaultIncludeRonin01">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Including vaulted files in your playbook.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
---
|
||||
- hosts: web
|
||||
become: yes
|
||||
vars:
|
||||
country_setting: France
|
||||
city_opening_scene: Montmartre
|
||||
|
||||
vars_files:
|
||||
- ronin_secret.yml
|
||||
|
||||
tasks:
|
||||
- name: Ensure httpd package is present
|
||||
yum:
|
||||
name: httpd
|
||||
state: latest
|
||||
|
||||
- name: Verify correct index file is present
|
||||
template:
|
||||
src: templates/index.html.j2
|
||||
dest: /var/www/html/index.html
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="VaultIncludeRonin02">
|
||||
<center><h2>ANSIBLE VAULT: COMPLETE ENCRYPTED FILE</h2>
|
||||
<p>Including vaulted files in your playbook.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
---
|
||||
- hosts: web
|
||||
become: yes
|
||||
vars:
|
||||
country_setting: France
|
||||
city_opening_scene: Montmartre
|
||||
|
||||
<mark> vars_files:
|
||||
- ronin_secret.yml </mark>
|
||||
|
||||
tasks:
|
||||
- name: Ensure httpd package is present
|
||||
yum:
|
||||
name: httpd
|
||||
state: latest
|
||||
|
||||
- name: Verify correct index file is present
|
||||
template:
|
||||
src: templates/index.html.j2
|
||||
dest: /var/www/html/index.html
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<section>
|
||||
|
||||
<section data-state="title alt" id="RedIntro-AnsibleVault-Fonzie">
|
||||
<h1>ANSIBLE VAULT: <br/>ENCRYPTED STRING EXAMPLE</h1>
|
||||
<p>(Encrypted Variables In A Plain File)</p><br>
|
||||
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<p>Encrypting Sensitive Variables Inside Your Playbooks With An Encrypted String</p>
|
||||
<aside class="notes">
|
||||
<p>Ansible includes a very powerful encryption method for times when you need to include sensitive information in a playbook in an encrypted format.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
<section id="VaultInitFonzie01">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>Use ansible-vault to create a new encrypted variable string.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodysw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault encrypt_string 'Jumped The Shark' --name 'fonzie_stunt'
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<center><h2>Here are the pieces</h2>
|
||||
<p>A breakdown of the command:</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodylw">
|
||||
ansible-vault
|
||||
encrypt_string
|
||||
'this phrase will be encrypted'
|
||||
--name 'variable_name_of_encrypted_var'
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>In this example, we are creating an encrypted string that will be placed into a non-encrypted YAML file.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section id="VaultInitFonzie02">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>Use ansible-vault to create a new encrypted variable string.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodysw">
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-vault encrypt_string 'Jumped The Shark' --name 'fonzie_stunt'
|
||||
New Vault password: <font color="red">fonzie</font><img src="images/passwordkey.png" width="10">
|
||||
Confirm New Vault password: <font color="red">fonzie</font><img src="images/passwordkey.png" width="10">
|
||||
|
||||
fonzie_stunt: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35613061636564623138646464393731633534343261393532343263633763356364633366636633
|
||||
6430663339613762306235323035326663363665316234650a303434333462343731356632333136
|
||||
37393966336465386131666635333537636133313864383865303138303262343939326563373730
|
||||
3063376263303037340a356263333131626239316630653465313931353863623237666464613030
|
||||
37346537336430386265633239346566313466323764336234346361626666643334
|
||||
|
||||
Encryption successful
|
||||
|
||||
<?=$terminal_prompt?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>The command will output a string that's encrypted against the password you provided.</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="VaultInitFonzie03">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>The pipe separates the multi-line value from the variable name.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
|
||||
fonzie_stunt:<mark> !vault | </mark>
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35613061636564623138646464393731633534343261393532343263633763356364633366636633
|
||||
6430663339613762306235323035326663363665316234650a303434333462343731356632333136
|
||||
37393966336465386131666635333537636133313864383865303138303262343939326563373730
|
||||
3063376263303037340a356263333131626239316630653465313931353863623237666464613030
|
||||
37346537336430386265633239346566313466323764336234346361626666643334
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Copy the encrypted string and paste it into a non-encrypted YAML file.</p>
|
||||
</aside>
|
||||
</section>
|
||||
@@ -0,0 +1,108 @@
|
||||
<section id="VaultViewFonzie01">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>Including an encrypted variable in a plaintext playbook.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
fonzie_show: Happy Days
|
||||
fonzie_transport: Motorcycle
|
||||
fonzie_stunt: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35613061636564623138646464393731633534343261393532343263633763356364633366636633
|
||||
6430663339613762306235323035326663363665316234650a303434333462343731356632333136
|
||||
37393966336465386131666635333537636133313864383865303138303262343939326563373730
|
||||
3063376263303037340a356263333131626239316630653465313931353863623237666464613030
|
||||
37346537336430386265633239346566313466323764336234346361626666643334
|
||||
fonzie_office: Mens room at Arnold's Diner
|
||||
fonzie_jacket: Leather
|
||||
fonzie_phrase: Aaaaaaayyyyyyyy
|
||||
|
||||
tasks:
|
||||
- name: prove that we can read the variables within the encrypted string
|
||||
debug:
|
||||
msg: |
|
||||
Fonzie is a character from the TV show, {{ fonzie_show }}. He rides a {{ fonzie_transport }},
|
||||
wears a {{ fonzie_jacket }} jacket, and has an office in the {{ fonzie_office }}.
|
||||
|
||||
Fonzie is most famous for his stunt where he {{ fonzie_stunt }}, after which,
|
||||
he said {{ fonzie_phrase }}!
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="VaultViewFonzie02">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>Including an encrypted variable in a plaintext playbook.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
fonzie_show: Happy Days
|
||||
fonzie_transport: Motorcycle
|
||||
<mark> fonzie_stunt: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
35613061636564623138646464393731633534343261393532343263633763356364633366636633
|
||||
6430663339613762306235323035326663363665316234650a303434333462343731356632333136
|
||||
37393966336465386131666635333537636133313864383865303138303262343939326563373730
|
||||
3063376263303037340a356263333131626239316630653465313931353863623237666464613030
|
||||
37346537336430386265633239346566313466323764336234346361626666643334 </mark>
|
||||
fonzie_office: Mens room at Arnold's Diner
|
||||
fonzie_jacket: Leather
|
||||
fonzie_phrase: Aaaaaaayyyyyyyy
|
||||
|
||||
tasks:
|
||||
- name: prove that we can read the variables within the encrypted string
|
||||
debug:
|
||||
msg: |
|
||||
Fonzie is a character from the TV show, {{ fonzie_show }}. He rides a {{ fonzie_transport }},
|
||||
wears a {{ fonzie_jacket }} jacket, and has an office in the {{ fonzie_office }}.
|
||||
|
||||
Fonzie is most famous for his stunt where he <mark>{{ fonzie_stunt }}</mark>, after which,
|
||||
he said {{ fonzie_phrase }}!
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<section id="VaultFonziePlaybookRun">
|
||||
<center><h2>ANSIBLE VAULT: ENCRYPTED VARIABLE</h2>
|
||||
<p>Including an encrypted variable in a plaintext playbook.</p>
|
||||
</center>
|
||||
|
||||
<div class="terminal space shadow">
|
||||
<div class="top">
|
||||
<div class="title">Ansible Terminal</div>
|
||||
</div>
|
||||
<pre class="bodymw">
|
||||
|
||||
<font color="gray"><?=$terminal_prompt?></font> ansible-playbook --ask-vault-pass fonzie_playbook.yml
|
||||
|
||||
Vault password:
|
||||
|
||||
PLAY [localhost] *************************************************************************************************************
|
||||
|
||||
TASK [Gathering Facts] *******************************************************************************************************
|
||||
<font color="#66FF00">ok: [localhost]</font>
|
||||
|
||||
TASK [prove that we can read the variable within the encrypted string] *******************************************************
|
||||
<font color="#66FF00">ok: [localhost] => {
|
||||
"msg": "Fonzie is a character from the TV show, Happy Days. He rides a Motorcycle,
|
||||
wears a Leather jacket, and has an office in the Mens room at Arnold's Diner.
|
||||
|
||||
Fonzie is most famous for his stunt where he Jumped The Shark, after which,
|
||||
he said Aaaaaaayyyyyyyy!"
|
||||
}</font>
|
||||
|
||||
PLAY RECAP *******************************************************************************************************************
|
||||
<font color="#66FF00">localhost</font> : <font color="#66FF00">ok=2</font> changed=0 unreachable=0 failed=0
|
||||
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<aside class="notes">
|
||||
<p>Stuff goes here</p>
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<section data-state="lab alt" id="<?=$labid?>-Sample01">
|
||||
<h1><?=$pretty_htmldir?> Lab Sample 01</h1>
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<p>This is sample page #1 that discusses things about <?=$pretty_htmldir?> and is meant strictly as a lab placeholder to show dynamic content.</p>
|
||||
</section>
|
||||
<section data-state="lab alt" id="<?=$labid?>-Sample02">
|
||||
<h1><?=$pretty_htmldir?> Lab Sample 02</h1>
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<p>This is sample page #2 that discusses things about <?=$pretty_htmldir?> and is meant strictly as a lab placeholder to show dynamic content.</p>
|
||||
</section>
|
||||
<section data-state="lab alt" id="<?=$labid?>-Sample03">
|
||||
<h1><?=$pretty_htmldir?> Lab Sample 03</h1>
|
||||
<img src="<?=$workshop_image?>" style="background-color: transparent; border: none;" height="250">
|
||||
<p>This is sample page #3 that discusses things about <?=$pretty_htmldir?> and is meant strictly as a lab placeholder to show dynamic content.</p>
|
||||
</section>
|
||||
Reference in New Issue
Block a user