-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
482ec7d
commit e8129eb
Showing
1,019 changed files
with
25,326 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
books/hands-on-enterprise-automation-on-linux/.gitattributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
# Custom for Visual Studio | ||
*.cs diff=csharp | ||
|
||
# Standard to msysgit | ||
*.doc diff=astextplain | ||
*.DOC diff=astextplain | ||
*.docx diff=astextplain | ||
*.DOCX diff=astextplain | ||
*.dot diff=astextplain | ||
*.DOT diff=astextplain | ||
*.pdf diff=astextplain | ||
*.PDF diff=astextplain | ||
*.rtf diff=astextplain | ||
*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
|
||
|
||
# Hands-On Enterprise Automation on Linux | ||
### Download a free PDF | ||
|
||
<i>If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.<br>Simply click on the link to claim your free PDF.</i> | ||
<p align="center"> <a href="https://packt.link/free-ebook/9781789131611">https://packt.link/free-ebook/9781789131611 </a> </p> |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example01/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible --version |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example02/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook simple.yml |
13 changes: 13 additions & 0 deletions
13
books/hands-on-enterprise-automation-on-linux/chapter02/example02/simple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Simple playbook | ||
hosts: localhost | ||
become: false | ||
|
||
tasks: | ||
- name: Show a message | ||
debug: | ||
msg: "Hello world!" | ||
- name: Touch a file | ||
file: | ||
path: /tmp/foo | ||
state: touch |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example03/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-doc file |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example04/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook -i hosts --ask-pass simple.yml |
3 changes: 3 additions & 0 deletions
3
books/hands-on-enterprise-automation-on-linux/chapter02/example04/hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[test] | ||
testhost1 | ||
testhost2 |
13 changes: 13 additions & 0 deletions
13
books/hands-on-enterprise-automation-on-linux/chapter02/example04/simple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Simple playbook | ||
hosts: all | ||
become: false | ||
|
||
tasks: | ||
- name: Show a message | ||
debug: | ||
msg: "Hello world!" | ||
- name: Touch a file | ||
file: | ||
path: /tmp/foo | ||
state: touch |
12 changes: 12 additions & 0 deletions
12
books/hands-on-enterprise-automation-on-linux/chapter02/example05/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N '' | ||
ssh-copy-id testhost1 | ||
ssh-copy-id testhost2 | ||
ansible-playbook -i hosts simple.yml |
3 changes: 3 additions & 0 deletions
3
books/hands-on-enterprise-automation-on-linux/chapter02/example05/hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[test] | ||
testhost1 | ||
testhost2 |
13 changes: 13 additions & 0 deletions
13
books/hands-on-enterprise-automation-on-linux/chapter02/example05/simple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Simple playbook | ||
hosts: all | ||
become: false | ||
|
||
tasks: | ||
- name: Show a message | ||
debug: | ||
msg: "Hello world!" | ||
- name: Touch a file | ||
file: | ||
path: /tmp/foo | ||
state: touch |
7 changes: 7 additions & 0 deletions
7
books/hands-on-enterprise-automation-on-linux/chapter02/example06/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Sample code only. |
7 changes: 7 additions & 0 deletions
7
books/hands-on-enterprise-automation-on-linux/chapter02/example06/hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[test] | ||
testhost1 | ||
testhost2 | ||
|
||
[test:vars] | ||
ansible_user=bob | ||
http_port=8080 |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example07/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook install-db.yml |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example07/install-db.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Install MariaDB Server | ||
hosts: localhost | ||
become: true | ||
|
||
tasks: | ||
- name: Install mariadb-server package | ||
apt: | ||
name: mariadb-server | ||
update_cache: yes |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter02/example08/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook install-db.yml |
7 changes: 7 additions & 0 deletions
7
books/hands-on-enterprise-automation-on-linux/chapter02/example08/install-db.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Install MariaDB Server | ||
hosts: localhost | ||
become: true | ||
|
||
roles: | ||
- install-mariadb |
5 changes: 5 additions & 0 deletions
5
...n-enterprise-automation-on-linux/chapter02/example08/roles/install-mariadb/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: Install mariadb-server package | ||
apt: | ||
name: mariadb-server | ||
update_cache: yes |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example09/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-galaxy install -p roles/ mrlesmithjr.mariadb-mysql | ||
ansible-playbook install-db.yml |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example09/install-db.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- name: Install MariaDB Server | ||
hosts: localhost | ||
become: true | ||
|
||
vars: | ||
mariadb_root_password: cambiame | ||
|
||
roles: | ||
- mrlesmithjr.mariadb-mysql |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example10/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook simple.yml | ||
ansible-playbook simple.yml -e "message=\"Hello from the CLI\"" |
16 changes: 16 additions & 0 deletions
16
books/hands-on-enterprise-automation-on-linux/chapter02/example10/simple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
- name: Simple playbook | ||
hosts: localhost | ||
become: false | ||
|
||
vars: | ||
message: "Life is beautiful!" | ||
|
||
tasks: | ||
- name: Show a message | ||
debug: | ||
msg: "{{ message }}" | ||
- name: Touch a file | ||
file: | ||
path: /tmp/foo | ||
state: touch |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example11/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible -m setup localhost | ||
ansible-playbook simple.yml |
13 changes: 13 additions & 0 deletions
13
books/hands-on-enterprise-automation-on-linux/chapter02/example11/simple.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Simple playbook | ||
hosts: localhost | ||
become: false | ||
|
||
tasks: | ||
- name: Show a message | ||
debug: | ||
msg: "{{ ansible_distribution }}" | ||
- name: Touch a file | ||
file: | ||
path: /tmp/foo | ||
state: touch |
10 changes: 10 additions & 0 deletions
10
books/hands-on-enterprise-automation-on-linux/chapter02/example12/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook apache-conf.yml | ||
ansible-playbook apache-template-conf.yml |
18 changes: 18 additions & 0 deletions
18
books/hands-on-enterprise-automation-on-linux/chapter02/example12/apache-conf.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- name: Deploy and customize an Apache configuration | ||
hosts: localhost | ||
become: true | ||
|
||
vars: | ||
docroot: "/var/www/myexample" | ||
|
||
tasks: | ||
- name: Copy static configuration file to remote host | ||
copy: | ||
src: files/vhost.conf | ||
dest: /etc/apache2/sites-available/my-vhost.conf | ||
- name: Replace static DocumentRoot with variable contents | ||
replace: | ||
path: /etc/apache2/sites-available/my-vhost.conf | ||
regexp: '^(\s+DocumentRoot)\s+.*$' | ||
replace: '\1 {{ docroot }}' |
13 changes: 13 additions & 0 deletions
13
books/hands-on-enterprise-automation-on-linux/chapter02/example12/apache-template-conf.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
- name: Deploy and customize an Apache configuration | ||
hosts: localhost | ||
become: true | ||
|
||
vars: | ||
docroot: "/var/www/myexample" | ||
|
||
tasks: | ||
- name: Copy across and populate the template configuration | ||
template: | ||
src: templates/vhost.conf.j2 | ||
dest: /etc/apache2/sites-available/my-vhost.conf |
4 changes: 4 additions & 0 deletions
4
books/hands-on-enterprise-automation-on-linux/chapter02/example12/files/vhost.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot "/var/www/automation" | ||
ServerName www.example.com | ||
</VirtualHost> |
4 changes: 4 additions & 0 deletions
4
books/hands-on-enterprise-automation-on-linux/chapter02/example12/templates/vhost.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot {{ docroot }} | ||
ServerName www.example.com | ||
</VirtualHost> |
9 changes: 9 additions & 0 deletions
9
books/hands-on-enterprise-automation-on-linux/chapter05/example01/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Instructions | ||
|
||
Tested on: | ||
- Ubuntu 18.04.2 | ||
- Ansible 2.8.4 | ||
|
||
Run this command: | ||
|
||
ansible-playbook -i hosts site.yml |
7 changes: 7 additions & 0 deletions
7
books/hands-on-enterprise-automation-on-linux/chapter05/example01/hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[imagesetup] | ||
192.168.81.141 | ||
|
||
[imagesetup:vars] | ||
ansible_user=imagebuild | ||
ansible_password=password | ||
ansible_sudo_pass=password |
Oops, something went wrong.