Hello All

12 views
Skip to first unread message

Amit Kulkarni

unread,
Aug 11, 2019, 12:12:53 PM8/11/19
to Ansible Project
Hello All,

I am very new to Ansible and have written just one play book to install tomcat on EC2 instance.
I wanted to know the best way to learn this tool and if someone can give me common task which can automated middleware area, I will be happy to start writing the playbooks for those task and seek advice on the group as needed.
Below is my Playbook for reference.
Request  to give some basic tasks which can help me learn Ansible quickly.
Thanks

---
- hosts: localhost
  tasks:
      - name: Run the equivalent of "apt-get update" as a separate step
        become: true
        apt:
         upgrade: yes
      - name: Install default-jdk
        apt:
         name: default-jdk
      - name: Create tomcat Group
        group:
          name: tomcat
          state: present
      - name: Create tomcat User
        user:
          name: tomcat
          state: present
      - name: Unarchive the zip file
        unarchive:
             src: https://www-us.apache.org/dist/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz
             dest: /opt/middleware
             remote_src: yes
      - name: Change file ownership, group and permissions
        file:
          path: /opt/middleware/
          owner: tomcat
          group: tomcat
          mode: '0777'
          recurse: yes


Reply all
Reply to author
Forward
0 new messages