Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
- name: Ensure ANSIBLE_GALAXY_TOKEN is set.
fail:
msg: A valid ANSIBLE_GALAXY_TOKEN must be set.
when: "lookup('env','ANSIBLE_GALAXY_TOKEN') | length == 0"
when: lookup('env','ANSIBLE_GALAXY_TOKEN') | length == 0

- name: Ensure the ~/.ansible directory exists.
file:
Expand Down
27 changes: 13 additions & 14 deletions demo.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
- name: Demo Lightspeed extension
- name: Demo Lightspeed extension
hosts: localhost
vars:
firewall_pkg: firewalld
web_pkg: httpd
ssl_pkg: mod_ssl
secret_src: /home/abeisemb/Pictures/thinking.png
secret_dest: /home/abeisemb/Pictures/thonking.png
tasks:
tasks:
- name: Task block
block:
- name: Install web_pkg on our local system
Expand All @@ -16,43 +16,43 @@
state: present
delegate_to: localhost
when: true

- name: Set up ssl_pkg.
ansible.builtin.set_fact:
ssl_cmd: sudo -u apache apache2ctl configtest
when: ssl_cmd is not defined

- name: Repeat the above task.
ansible.builtin.debug:
msg: "{{ ssl_cmd }}"

- name: Print all relevant facts.
ansible.builtin.debug:
var: ansible_facts

- name: File my taxes.
ansible.builtin.stat:
path: /tmp/ansible_facts.txt
register: stat_result

- name: Create a task that notifies the spaghetti handler.
ansible.builtin.copy:
dest: /tmp/ansible_facts.txt
content: " hi from inside the new file\n"
when: not stat_result.stat.exists

- name: Copy secret_src to secret_dest with mode 0777.
ansible.builtin.copy:
src: "{{ secret_src }}"
dest: "{{ secret_dest }}"
mode: '0777'
mode: "0777"

- name: Configure SELinux to permissive mode.
ansible.posix.selinux:
policy: targeted
state: permissive
when: ansible_facts['os_family'] == "RedHat"

- name: Set the tuned-adm profile to desktop.
community.general.alternatives:
name: tuned-adm
Expand All @@ -65,7 +65,7 @@
state: enforcing
when: ansible_facts['os_family'] == "RedHat"

# Install postgresql-server & run postgresql-setup command.
# Install postgresql-server & run postgresql-setup command.
- name: Install postgresql-server
ansible.builtin.package:
name: "{{ _name_ }}"
Expand All @@ -76,8 +76,7 @@
ansible.builtin.command: postgresql-setup initdb
ignore_errors: true

- name: Pull from a theoretical git repo.
git:
repo: "https://github.com/abeisemb/lightspeed-code-bot-test-abeisemb"
- name: Pull from a theoretical git repo.
git:
repo: https://github.com/abeisemb/lightspeed-code-bot-test-abeisemb
version: HEAD

4 changes: 2 additions & 2 deletions roles/geerlingguy.elasticsearch/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
elasticsearch_version: '7.x'
elasticsearch_version: 7.x
elasticsearch_package: elasticsearch
elasticsearch_package_state: present

Expand All @@ -12,4 +12,4 @@ elasticsearch_http_port: 9200
elasticsearch_heap_size_min: 1g
elasticsearch_heap_size_max: 2g

elasticsearch_extra_options: ''
elasticsearch_extra_options: ""
5 changes: 2 additions & 3 deletions roles/geerlingguy.elasticsearch/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---
dependencies: []

galaxy_info:
role_name: elasticsearch
author: geerlingguy
description: Elasticsearch for Linux.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
company: Midwestern Mac, LLC
license: license (BSD, MIT)
min_ansible_version: 2.4
platforms:
- name: EL
Expand Down
5 changes: 2 additions & 3 deletions roles/geerlingguy.elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- include_tasks: setup-RedHat.yml
when: ansible_os_family == 'RedHat'

Expand All @@ -17,7 +16,7 @@
dest: "{{ item }}"
owner: root
group: elasticsearch
mode: 0660
mode: "0660"
with_items:
- /etc/elasticsearch/elasticsearch.yml
- /etc/elasticsearch/jvm.options
Expand All @@ -30,7 +29,7 @@
dest: "{{ item }}"
owner: root
group: elasticsearch
mode: 0660
mode: "0660"
with_items:
- /etc/elasticsearch/elasticsearch.yml
- /etc/elasticsearch/jvm.options.d/heap.options
Expand Down
2 changes: 1 addition & 1 deletion roles/geerlingguy.elasticsearch/tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@

- name: Add Elasticsearch repository.
apt_repository:
repo: 'deb https://artifacts.elastic.co/packages/{{ elasticsearch_version }}/apt stable main'
repo: deb https://artifacts.elastic.co/packages/{{ elasticsearch_version }}/apt stable main
state: present
update_cache: true
2 changes: 1 addition & 1 deletion roles/geerlingguy.elasticsearch/tasks/setup-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
template:
src: elasticsearch.repo.j2
dest: /etc/yum.repos.d/elasticsearch.repo
mode: 0644
mode: "0644"