Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible-examples.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Smith <jsmith39@systems.wvu.edu>2018-10-03 01:21:36 +0300
committerJoshua Smith <jsmith39@systems.wvu.edu>2018-10-03 01:21:36 +0300
commit17089f6112107e21c455e6626046ebfd2b1f4ba4 (patch)
treeb41f572e2b5d6951c96d3ddc35b193df7862f03f
parent97e999d8af921e7af0813df44b3269ecd9338b5c (diff)
Fix ansible-lint reported issues in:
deploy-application.yml roles/java-app/tasks/main.yml roles/jboss-standalone/tasks/main.yml
-rw-r--r--jboss-standalone/deploy-application.yml4
-rw-r--r--jboss-standalone/roles/java-app/tasks/main.yml24
-rw-r--r--jboss-standalone/roles/jboss-standalone/tasks/main.yml194
3 files changed, 111 insertions, 111 deletions
diff --git a/jboss-standalone/deploy-application.yml b/jboss-standalone/deploy-application.yml
index 520532d..fb9876c 100644
--- a/jboss-standalone/deploy-application.yml
+++ b/jboss-standalone/deploy-application.yml
@@ -1,9 +1,9 @@
---
-# This playbook deploys two simple applications to JBoss server.
+# This playbook deploys two simple applications to JBoss server.
- hosts: all
roles:
-# Optionally, (re)deploy JBoss here
+# Optionally, (re)deploy JBoss here.
# - jboss-standalone
- java-app
diff --git a/jboss-standalone/roles/java-app/tasks/main.yml b/jboss-standalone/roles/java-app/tasks/main.yml
index f8416fd..9a6700c 100644
--- a/jboss-standalone/roles/java-app/tasks/main.yml
+++ b/jboss-standalone/roles/java-app/tasks/main.yml
@@ -1,12 +1,12 @@
----
-- name: Copy application WAR file to host
- copy: src=jboss-helloworld.war dest=/tmp
-
-- name: Deploy HelloWorld to JBoss
- jboss: deploy_path=/usr/share/jboss-as/standalone/deployments/ src=/tmp/jboss-helloworld.war deployment=helloworld.war state=present
-
-- name: Copy application WAR file to host
- copy: src=ticket-monster.war dest=/tmp
-
-- name: Deploy Ticket Monster to JBoss
- jboss: deploy_path=/usr/share/jboss-as/standalone/deployments/ src=/tmp/ticket-monster.war deployment=ticket-monster.war state=present \ No newline at end of file
+---
+- name: Copy application WAR file to host
+ copy: src=jboss-helloworld.war dest=/tmp
+
+- name: Deploy HelloWorld to JBoss
+ jboss: deploy_path=/usr/share/jboss-as/standalone/deployments/ src=/tmp/jboss-helloworld.war deployment=helloworld.war state=present
+
+- name: Copy application WAR file to host
+ copy: src=ticket-monster.war dest=/tmp
+
+- name: Deploy Ticket Monster to JBoss
+ jboss: deploy_path=/usr/share/jboss-as/standalone/deployments/ src=/tmp/ticket-monster.war deployment=ticket-monster.war state=present
diff --git a/jboss-standalone/roles/jboss-standalone/tasks/main.yml b/jboss-standalone/roles/jboss-standalone/tasks/main.yml
index d7d76e4..524b932 100644
--- a/jboss-standalone/roles/jboss-standalone/tasks/main.yml
+++ b/jboss-standalone/roles/jboss-standalone/tasks/main.yml
@@ -1,97 +1,97 @@
----
-- name: Install Java 1.7 and some basic dependencies
- yum:
- name: "{{ item }}"
- state: present
- with_items:
- - unzip
- - java-1.7.0-openjdk
- - libselinux-python
- - libsemanage-python
-
-- name: Download JBoss from jboss.org
- get_url:
- url: http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip
- dest: /opt/jboss-as-7.1.1.Final.zip
-
-- name: Extract archive
- unarchive:
- dest: /usr/share
- src: /opt/jboss-as-7.1.1.Final.zip
- creates: /usr/share/jboss-as
- copy: no
-
- # Rename the dir to avoid encoding the version in the init script
-- name: Rename install directory
- command: chdir=/usr/share /bin/mv jboss-as-7.1.1.Final jboss-as creates=/usr/share/jboss-as
-
-- name: Copying standalone.xml configuration file
- template:
- src: standalone.xml
- dest: /usr/share/jboss-as/standalone/configuration/
- notify: restart jboss
-
-- name: Add group "jboss"
- group:
- name: jboss
-
-- name: Add user "jboss"
- user:
- name: jboss
- group: jboss
- home: /usr/share/jboss-as
-
-- name: Change ownership of JBoss installation
- file:
- path: /usr/share/jboss-as/
- owner: jboss
- group: jboss
- state: directory
- recurse: yes
-
-- name: Copy the init script
- copy:
- src: jboss-as-standalone.sh
- dest: /etc/init.d/jboss
- mode: 0755
-
-- name: Workaround for systemd bug
- shell: service jboss start && chkconfig jboss on
- ignore_errors: yes
-
-- name: Enable JBoss to be started at boot
- service:
- name: jboss
- enabled: yes
- state: started
-
-- name: deploy iptables rules
- template:
- src: iptables-save
- dest: /etc/sysconfig/iptables
- when: ansible_distribution_major_version != "7"
- notify: restart iptables
-
-- name: Ensure that firewalld is installed
- yum:
- name: firewalld
- state: present
- when: ansible_distribution_major_version == "7"
-
-- name: Ensure that firewalld is started
- service:
- name: firewalld
- state: started
- when: ansible_distribution_major_version == "7"
-
-- name: deploy firewalld rules
- firewalld:
- immediate: yes
- port: "{{ item }}"
- state: enabled
- permanent: yes
- when: ansible_distribution_major_version == "7"
- with_items:
- - "{{ http_port }}/tcp"
- - "{{ https_port }}/tcp"
-
+---
+- name: Install Java 1.7 and some basic dependencies
+ yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - unzip
+ - java-1.7.0-openjdk
+ - libselinux-python
+ - libsemanage-python
+
+- name: Download JBoss from jboss.org
+ get_url:
+ url: http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip
+ dest: /opt/jboss-as-7.1.1.Final.zip
+
+- name: Extract archive
+ unarchive:
+ dest: /usr/share
+ src: /opt/jboss-as-7.1.1.Final.zip
+ creates: /usr/share/jboss-as
+ copy: no
+
+ # Rename the dir to avoid encoding the version in the init script
+- name: Rename install directory
+ command: chdir=/usr/share /bin/mv jboss-as-7.1.1.Final jboss-as creates=/usr/share/jboss-as
+
+- name: Copying standalone.xml configuration file
+ template:
+ src: standalone.xml
+ dest: /usr/share/jboss-as/standalone/configuration/
+ notify: restart jboss
+
+- name: Add group "jboss"
+ group:
+ name: jboss
+
+- name: Add user "jboss"
+ user:
+ name: jboss
+ group: jboss
+ home: /usr/share/jboss-as
+
+- name: Change ownership of JBoss installation
+ file:
+ path: /usr/share/jboss-as/
+ owner: jboss
+ group: jboss
+ state: directory
+ recurse: yes
+
+- name: Copy the init script
+ copy:
+ src: jboss-as-standalone.sh
+ dest: /etc/init.d/jboss
+ mode: 0755
+
+- name: Workaround for systemd bug
+ shell: service jboss start && chkconfig jboss on
+ ignore_errors: yes
+
+- name: Enable JBoss to be started at boot
+ service:
+ name: jboss
+ enabled: yes
+ state: started
+
+- name: deploy iptables rules
+ template:
+ src: iptables-save
+ dest: /etc/sysconfig/iptables
+ when: ansible_distribution_major_version != "7"
+ notify: restart iptables
+
+- name: Ensure that firewalld is installed
+ yum:
+ name: firewalld
+ state: present
+ when: ansible_distribution_major_version == "7"
+
+- name: Ensure that firewalld is started
+ service:
+ name: firewalld
+ state: started
+ when: ansible_distribution_major_version == "7"
+
+- name: deploy firewalld rules
+ firewalld:
+ immediate: yes
+ port: "{{ item }}"
+ state: enabled
+ permanent: yes
+ when: ansible_distribution_major_version == "7"
+ with_items:
+ - "{{ http_port }}/tcp"
+ - "{{ https_port }}/tcp"
+