automate all the things - sebastian feldmann · ansible modules • package management (apt,...
TRANSCRIPT
![Page 1: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/1.jpg)
Automate all the things
Sebastian Feldmann
![Page 2: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/2.jpg)
"Automate until the job is boring as hell"
![Page 3: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/3.jpg)
System Configuration
![Page 4: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/4.jpg)
Software packaging
![Page 5: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/5.jpg)
Software deployment
![Page 6: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/6.jpg)
Combining all to work seamlessly together
![Page 7: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/7.jpg)
System Configuration
![Page 8: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/8.jpg)
“App deployment, configuration management and orchestrationall from one system. Powerful automation that you can learn quickly.“
![Page 9: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/9.jpg)
About Ansible
• Written in Python
• Using SSH
• No agents
• YAML
![Page 10: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/10.jpg)
Ansible Modules• Package management (apt, yum…)
• Command execution (command, shell)
• Service management (start, stop…)
• File handling (copy, template…)
• SCM (git, Bazzar, Subversion)
![Page 11: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/11.jpg)
Inventory
![Page 12: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/12.jpg)
Roles
![Page 13: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/13.jpg)
Playbook
![Page 14: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/14.jpg)
System configuration with Ansible
![Page 15: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/15.jpg)
Inventory
ops/+-inv/+-integration/+-local/+-production/
good practice inventory setup
![Page 16: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/16.jpg)
Inventory
[webserver]192.168.1.111
[dbserver]192.168.1.222192.168.1.223
ops/inv/integration/hosts
![Page 17: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/17.jpg)
Playbook
-hosts:webserverroles:-apache
ops/install.webserver.yml
![Page 18: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/18.jpg)
Role
ops/+-roles/|+-apache/|+-files/|+-handlers/|+-tasks/|+-templates/+-install.webserver.yml
good practice role setup
![Page 19: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/19.jpg)
Tasks
-name:installapacheaction:aptpkg=apache2state=presentforce=yes
-name:copympmpreforkconfcopy:dest=/etc/apache2/mods-available/mpm_prefork.confsrc=mpm_prefork.confnotify:restartapache
ops/roles/apache/tasks/main.yml
![Page 20: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/20.jpg)
Tasks
-name:installapacheaction:aptpkg=apache2state=presentforce=yes
-name:copympmpreforkconfcopy:dest=/etc/apache2/mods-available/mpm_prefork.confsrc=mpm_prefork.confnotify:restartapache
ops/roles/apache/tasks/main.yml
![Page 21: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/21.jpg)
Tasks
-name:installapacheaction:aptpkg=apache2state=presentforce=yes
-name:copympmpreforkconfcopy:dest=/etc/apache2/mods-available/mpm_prefork.confsrc=mpm_prefork.confnotify:restartapache
ops/roles/apache/tasks/main.yml
![Page 22: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/22.jpg)
Tasks
-name:installapacheaction:aptpkg=apache2state=presentforce=yes
-name:copympmpreforkconfcopy:dest=/etc/apache2/mods-available/mpm_prefork.confsrc=mpm_prefork.confnotify:restartapache
ops/roles/apache/tasks/main.yml
![Page 23: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/23.jpg)
Handler
-name:restartapacheaction:servicename=apache2state=restarted
ops/roles/apache/handlers/main.yml
![Page 24: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/24.jpg)
Handler
-name:restartapacheaction:servicename=apache2state=restarted
ops/roles/apache/handlers/main.yml
![Page 25: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/25.jpg)
Recap
• Create inventories
• Install playbook
• Apache role
• Install tasks / handlers
![Page 26: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/26.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hostsinstall.webserver.yml
execution example
![Page 27: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/27.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hostsinstall.webserver.yml
execution example
![Page 28: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/28.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hostsinstall.webserver.yml
execution example
![Page 29: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/29.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hostsinstall.webserver.yml
execution example
![Page 30: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/30.jpg)
PLAYBOOK:install.webserver.yml*******************************************1playsinansible/install.webserver.yml
PLAY[webserver]***************************************************************
TASK[apache:installapache]***************************************************************ok:[192.168.1.111]
TASK[apache-c24:copympmpreforkconf]*********************************************ok:[192.168.1.111]NOTIFIEDHANDLERrestartapache
PLAYRECAP****************************************************192.168.1.111:ok=2changed=2unreachable=0failed=0
Finished:SUCCESS
![Page 31: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/31.jpg)
PLAYBOOK:install.webserver.yml*******************************************1playsinansible/install.webserver.yml
PLAY[webserver]***************************************************************
TASK[apache:installapache]***************************************************************ok:[192.168.1.111]
TASK[apache-c24:copympmpreforkconf]*********************************************ok:[192.168.1.111]NOTIFIEDHANDLERrestartapache
PLAYRECAP****************************************************192.168.1.111:ok=2changed=0unreachable=0failed=0
Finished:SUCCESS
![Page 32: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/32.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--checkinstall.webserver.yml
dry run with --check
$ansible-playbook-iinv/integration/hosts--limit192.168.1.111install.webserver.yml
restrict execution with --limit
![Page 33: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/33.jpg)
![Page 34: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/34.jpg)
Software Packaging
![Page 35: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/35.jpg)
"Ant can be used to pilot any type of process which can be described in terms of targets and tasks"
![Page 36: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/36.jpg)
Ant
• Written in Java
• XML configuration
• Targets (tasks)
• Bundled with Java
![Page 37: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/37.jpg)
Software packaging with Ant
![Page 38: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/38.jpg)
Ant Configuration
build.xml
<?xmlversion="1.0"encoding="UTF-8"?><projectname="projectx"default="build"><targetname="build"depends="target1,target2,target3"/><targetname="target1">...</target><targetname="target2">...</target>...</project>
![Page 39: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/39.jpg)
Ant Configuration
build.xml
<?xmlversion="1.0"encoding="UTF-8"?><projectname="projectx"default="build"><targetname="build"depends="target1,target2,target3"/><targetname="target1">...</target><targetname="target2">...</target>...</project>
![Page 40: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/40.jpg)
Ant Configuration
build.xml
<?xmlversion="1.0"encoding="UTF-8"?><projectname="projectx"default="build"><targetname="build"depends="target1,target2,target3"/><targetname="target1">...</target><targetname="target2">...</target>...</project>
![Page 41: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/41.jpg)
Ant Configuration
build.xml
<?xmlversion="1.0"encoding="UTF-8"?><projectname="projectx"default="build"><targetname="build"depends="target1,target2,target3"/><targetname="target1">...</target><targetname="target2">...</target>...</project>
![Page 42: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/42.jpg)
Composer
<targetname="composer-install"><execexecutable="composer"failonerror="true"><argvalue="install"/><argvalue="--no-interaction"/></exec></target>
build.xml
![Page 43: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/43.jpg)
Composer
<targetname="composer-install"><execexecutable="composer"failonerror="true"><argvalue="install"/><argvalue="--no-interaction"/></exec></target>
build.xml
![Page 44: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/44.jpg)
Composer
<targetname="composer-install"><execexecutable="composer"failonerror="true"><argvalue="install"/><argvalue="--no-interaction"/></exec></target>
build.xml
![Page 45: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/45.jpg)
Composer
<targetname="composer-install"><execexecutable="composer"failonerror="true"><argvalue="install"/><argvalue="--no-interaction"/></exec></target>
build.xml
![Page 46: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/46.jpg)
Composer
<targetname="composer-install"><execexecutable="composer"failonerror="true"><argvalue="install"/><argvalue="--no-interaction"/></exec></target>
build.xml
![Page 47: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/47.jpg)
PHPUnit
<targetname="phpunit"description="Rununittests"><execexecutable="phpunit"failonerror="true"></exec></target>
build.xml
![Page 48: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/48.jpg)
PHPUnit
<targetname="phpunit"description="Rununittests"><execexecutable="phpunit"failonerror="true"></exec></target>
build.xml
![Page 49: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/49.jpg)
PHPUnit
<targetname="phpunit"description="Rununittests"><execexecutable="phpunit"failonerror="true"></exec></target>
build.xml
![Page 50: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/50.jpg)
PHPUnit
<targetname="phpunit"description="Rununittests"><execexecutable="phpunit"failonerror="true"></exec></target>
build.xml
![Page 51: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/51.jpg)
Ant Tasks
• Minify Assets
• Cache warmup (Templates, DIContainer…)
• …
![Page 52: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/52.jpg)
Ant Execution
$ant
execute default target
$antphpunit
execute specific target
![Page 53: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/53.jpg)
![Page 54: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/54.jpg)
Software Deployment
![Page 55: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/55.jpg)
Software deployment with Ansible
![Page 56: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/56.jpg)
Software Deployment
• Copy app to server
• Activate deployed app
• Allow quick rollbacks
![Page 57: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/57.jpg)
Half Way There
• Enhance the inventory
• New playbook
• New role
![Page 58: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/58.jpg)
Inventory
ops/+-inv/+-integration/+-group_vars/+-host_vars/
add variables
![Page 59: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/59.jpg)
Variables
system:environment:integration
projectx:domain:www.projectx.int
ops/inv/integration/group_vars/webserver
![Page 60: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/60.jpg)
Playbook
- hosts:webserverroles:-projectx
ops/deploy.projectx.yml
![Page 61: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/61.jpg)
Role
ops/+-roles/|+-projectx/|+-files/|+-handler/|+-tasks/|+-templates/+-deploy.projectx.yml
best practice role setup
![Page 62: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/62.jpg)
Tasks#createthedirectoryforthecurrentappversion-name:Createversiondirectoryfile:path=/var/www/projectx/{{version}}state=directory
#copythepreparedapptoyourwebservers-name:Copyfilestoserversynchronize:src={{app}}dest=/var/www/projectx/{{version}}perms=yesrecursive=yesdelete=yesowner=nogroup=no
ops/roles/projectx/main.yml
![Page 63: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/63.jpg)
Tasks#createthedirectoryforthecurrentappversion-name:Createversiondirectoryfile:path=/var/www/projectx/{{version}}state=directory
#copythepreparedapptoyourwebservers-name:Copyfilestoserversynchronize:src={{app}}dest=/var/www/projectx/{{version}}perms=yesrecursive=yesdelete=yesowner=nogroup=no
ops/roles/projectx/main.yml
![Page 64: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/64.jpg)
Tasks#createthedirectoryforthecurrentappversion-name:Createversiondirectoryfile:path=/var/www/projectx/{{version}}state=directory
#copythepreparedapptoyourwebservers-name:Copyfilestoserversynchronize:src={{app}}dest=/var/www/projectx/{{version}}perms=yesrecursive=yesdelete=yesowner=nogroup=no
ops/roles/projectx/main.yml
![Page 65: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/65.jpg)
Tasks#createthedirectoryforthecurrentappversion-name:Createversiondirectoryfile:path=/var/www/projectx/{{version}}state=directory
#copythepreparedapptoyourwebservers-name:Copyfilestoserversynchronize:src={{app}}dest=/var/www/projectx/{{version}}perms=yesrecursive=yesdelete=yesowner=nogroup=no
ops/roles/projectx/main.yml
![Page 66: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/66.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 67: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/67.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 68: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/68.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 69: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/69.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 70: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/70.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 71: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/71.jpg)
Tasks
#createasymlinktoactivatethevhost#couldbedonewith"command:a2ensiteprojectx.conf"#butthiswouldalwaystriggeranapacherestart#evenifnothingchanges-name:Activatevhostconfigurationfile:dest=/etc/apache2/sites-enabled/010-projectx.confsrc=/etc/apache2/sites-available/projectx.confstate=linknotify:restartapache
ops/roles/projectx/tasks/main.yml
![Page 72: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/72.jpg)
Tasks
#createasymlinktoactivatethevhost#couldbedonewith"command:a2ensiteprojectx.conf"#butthiswouldalwaystriggeranapacherestart#evenifnothingchanges-name:Activatevhostconfigurationfile:dest=/etc/apache2/sites-enabled/010-projectx.confsrc=/etc/apache2/sites-available/projectx.confstate=linknotify:restartapache
ops/roles/projectx/tasks/main.yml
![Page 73: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/73.jpg)
Tasks
#createasymlinktoactivatethevhost#couldbedonewith"command:a2ensiteprojectx.conf"#butthiswouldalwaystriggeranapacherestart#evenifnothingchanges-name:Activatevhostconfigurationfile:dest=/etc/apache2/sites-enabled/010-projectx.confsrc=/etc/apache2/sites-available/projectx.confstate=linknotify:restartapache
ops/roles/projectx/tasks/main.yml
![Page 74: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/74.jpg)
Tasks
#createasymlinktoactivatethevhost#couldbedonewith"command:a2ensiteprojectx.conf"#butthiswouldalwaystriggeranapacherestart#evenifnothingchanges-name:Activatevhostconfigurationfile:dest=/etc/apache2/sites-enabled/010-projectx.confsrc=/etc/apache2/sites-available/projectx.confstate=linknotify:restartapache
ops/roles/projectx/tasks/main.yml
![Page 75: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/75.jpg)
Tasks
#createasymlinktoactivatethevhost#couldbedonewith"command:a2ensiteprojectx.conf"#butthiswouldalwaystriggeranapacherestart#evenifnothingchanges-name:Activatevhostconfigurationfile:dest=/etc/apache2/sites-enabled/010-projectx.confsrc=/etc/apache2/sites-available/projectx.confstate=linknotify:restartapache
ops/roles/projectx/tasks/main.yml
![Page 76: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/76.jpg)
Template
<VirtualHost*:80>ServerName{{projectx.domain}}DocumentRoot/var/www/projectx/{{version}}/htdocs
setenvAPP.ENVIRONMENT{{system.environment}}
<Directory/var/www/projectx/{{version}}/htdocs>AllowOverrideAllRequireallgranted</Directory></VirtualHost>
ops/roles/projectx/templates/projectx.conf
![Page 77: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/77.jpg)
Variables
system:environment:integration
projectx:domain:www.projectx.int
ops/inv/integration/group_vars/webserver
![Page 78: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/78.jpg)
Template
<VirtualHost*:80>ServerName{{projectx.domain}}DocumentRoot/var/www/projectx/{{version}}/htdocs
setenvAPP.ENVIRONMENT{{system.environment}}
<Directory/var/www/projectx/{{version}}/htdocs>AllowOverrideAllRequireallgranted</Directory></VirtualHost>
ops/roles/projectx/templates/projectx.conf
![Page 79: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/79.jpg)
Recap
• Inventory variables
• Deploy playbook
• Project role
• Deployment tasks
![Page 80: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/80.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 81: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/81.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 82: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/82.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 83: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/83.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 84: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/84.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 85: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/85.jpg)
Execute Ansible
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.1app=/some/local/dir/app/"deploy.projectx.yml
deployment execution
![Page 86: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/86.jpg)
Tasks
#deploythevhostconfigurationforourproject-name:Deployvhostconfigurationaction:templatesrc=projectx.confdest=/etc/apache2/sites-available/projectx.confnotify:restartapachetags:rollback
ops/roles/projectx/main.yml
![Page 87: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/87.jpg)
Template
<VirtualHost*:80>ServerName{{projectx.domain}}DocumentRoot/var/www/projectx/{{version}}/htdocs
setenvAPP.ENVIRONMENT{{system.environment}}
<Directory/var/www/projectx/{{version}}/htdocs>AllowOverrideAllRequireallgranted</Directory></VirtualHost>
ops/roles/projectx/templates/projectx.conf
![Page 88: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/88.jpg)
Rollback
$ansible-playbook-iinv/integration/hosts--extra-vars"version=1.0.0"--tagsrollbackdeploy.projectx.yml
rollback execution
![Page 89: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/89.jpg)
![Page 90: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/90.jpg)
System Config
• Clone repository
• Execute Ansible
![Page 91: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/91.jpg)
Deployment
• Tag version
• Checkout version
• Execute Ant
• Execute Ansible
![Page 92: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/92.jpg)
Not boring!
![Page 93: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/93.jpg)
NOT BAD
![Page 94: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/94.jpg)
But I only want to click a button
![Page 95: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/95.jpg)
And everything should work
![Page 96: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/96.jpg)
“Build great things at any scale“
![Page 97: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/97.jpg)
Jenkins
• Written in Java
• Build server
• Projects / Jobs
• Jetty (build in webserver)
![Page 98: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/98.jpg)
Ansible Plugin
![Page 99: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/99.jpg)
System configuration with Ansible and Jenkins
![Page 100: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/100.jpg)
System Management
![Page 101: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/101.jpg)
SCM Config
use some SCM to manage your Ansible project
![Page 102: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/102.jpg)
Parameter Setup
![Page 103: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/103.jpg)
Ansible Plugin Config
parameter usage
![Page 104: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/104.jpg)
Job Execution
![Page 105: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/105.jpg)
System Configuration
• Push code to git repository
• Push a button
![Page 106: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/106.jpg)
Software packaging and deployment with Ant, Ansible and Jenkins
![Page 107: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/107.jpg)
Software Deployment
![Page 108: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/108.jpg)
Parameter Setup
![Page 109: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/109.jpg)
SCM Config
configure projectx SCM
![Page 110: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/110.jpg)
Ant
Ant support out of the box
![Page 111: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/111.jpg)
Ansible Plugin Config
setup ansible playbook and inventory
![Page 112: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/112.jpg)
Ansible Extra Variables
setup version and application directory
![Page 113: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/113.jpg)
Job Execution
![Page 114: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/114.jpg)
App Deployment
• Tag version in git repository
• Push button
![Page 115: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/115.jpg)
Recap
• System Management Build
• Software Deployment Build
• Execute everything with a single click
![Page 116: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/116.jpg)
Is it getting boring yet?
![Page 117: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/117.jpg)
At least a little right ;)
![Page 118: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/118.jpg)
![Page 119: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/119.jpg)
![Page 120: Automate all the things - Sebastian Feldmann · Ansible Modules • Package management (apt, yum…) • Command execution (command, shell) • Service management (start, stop…)](https://reader034.vdocuments.us/reader034/viewer/2022042805/5f6615fdfea3966c5167fc7f/html5/thumbnails/120.jpg)
Sebastian Feldmann
@movetodevnull
https://phpbu.de
sebastianfeldmann