-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from rainerleber/feature/fix_galaxy_inclusion
fix lint reference, add runtime
- Loading branch information
Showing
66 changed files
with
727 additions
and
655 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
|
||
skip_list: | ||
- command-instead-of-module | ||
- command-instead-of-shell | ||
- line-length | ||
- risky-shell-pipe | ||
- no-changed-when | ||
- no-handler | ||
- ignore-errors |
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
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,14 @@ | ||
====================================== | ||
Community SAP_OPERATIONS Release Notes | ||
====================================== | ||
|
||
.. contents:: Topics | ||
|
||
|
||
v0.9.0 | ||
====== | ||
|
||
Release Summary | ||
--------------- | ||
|
||
This is the first release of the ``community.sap_operations`` collection. It is the initial relase for the ``community.sap_operations`` collection |
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,22 @@ | ||
objects: | ||
role: {} | ||
plugins: | ||
become: {} | ||
cache: {} | ||
callback: {} | ||
cliconf: {} | ||
connection: {} | ||
httpapi: {} | ||
inventory: {} | ||
lookup: {} | ||
module: | ||
sap_pyrfc: | ||
description: Execute RFC calls | ||
name: sap_pyrfc | ||
namespace: '' | ||
version_added: 0.1.0 | ||
netconf: {} | ||
shell: {} | ||
strategy: {} | ||
vars: {} | ||
version: 1.0.0 |
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 @@ | ||
ancestor: null | ||
releases: | ||
0.9.0: | ||
changes: | ||
release_summary: 'This is the first release of the ``community.sap_operations`` | ||
collection. It is the initial relase for the collection' | ||
fragments: | ||
- 0.9.0.yml | ||
release_date: '2022-05-16' |
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,30 @@ | ||
changelog_filename_template: ../CHANGELOG.rst | ||
changelog_filename_version_depth: 0 | ||
changes_file: changelog.yaml | ||
changes_format: combined | ||
keep_fragments: false | ||
mention_ancestor: true | ||
flatmap: true | ||
new_plugins_after_name: removed_features | ||
notesdir: fragments | ||
prelude_section_name: release_summary | ||
prelude_section_title: Release Summary | ||
sections: | ||
- - major_changes | ||
- Major Changes | ||
- - minor_changes | ||
- Minor Changes | ||
- - breaking_changes | ||
- Breaking Changes / Porting Guide | ||
- - deprecated_features | ||
- Deprecated Features | ||
- - removed_features | ||
- Removed Features (previously deprecated) | ||
- - security_fixes | ||
- Security Fixes | ||
- - bugfixes | ||
- Bugfixes | ||
- - known_issues | ||
- Known Issues | ||
title: Community SAP_OPERATIONS | ||
trivial_section_name: trivial |
Empty file.
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,2 @@ | ||
--- | ||
requires_ansible: '>=2.9.10' |
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
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
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 |
---|---|---|
@@ -1,47 +1,47 @@ | ||
- name: Remove existing {{ os_ansible_user_userid }} | ||
block: | ||
- name: Kill all processes under {{ os_ansible_user_userid }} | ||
ignore_errors: yes | ||
shell: | | ||
ignore_errors: true | ||
ansible.builtin.shell: | | ||
killall -u {{ os_ansible_user_userid }} | ||
- name: Remove {{ os_ansible_user_userid }} | ||
user: | ||
ansible.builtin.user: | ||
name: '{{ os_ansible_user_userid }}' | ||
state: absent | ||
remove: yes | ||
force: yes | ||
remove: true | ||
force: true | ||
|
||
- name: Remove {{ os_ansible_user_userid }} group | ||
group: | ||
ansible.builtin.group: | ||
name: '{{ os_ansible_user_userid }}' | ||
state: absent | ||
when: os_ansible_user_force_recreate | ||
|
||
- name: Create {{ os_ansible_user_userid }} group | ||
group: | ||
ansible.builtin.group: | ||
name: '{{ os_ansible_user_userid }}' | ||
gid: '{{ os_ansible_user_gid }}' | ||
state: present | ||
|
||
- name: Create {{ os_ansible_user_userid }} | ||
user: | ||
ansible.builtin.user: | ||
name: '{{ os_ansible_user_userid }}' | ||
comment: "Ansible User" | ||
uid: '{{ os_ansible_user_uid }}' | ||
group: '{{ os_ansible_user_userid }}' | ||
groups: "{{ os_ansible_user_userid }},wheel" | ||
|
||
- name: Add to sudoers NOPASSWD | ||
shell: | | ||
ansible.builtin.shell: | | ||
echo '{{ os_ansible_user_password }}' | passwd --stdin {{ os_ansible_user_userid }} | ||
echo -e '{{ os_ansible_user_userid }}\tALL=(ALL)\tNOPASSWD: ALL' > /etc/sudoers.d/{{ os_ansible_user_userid }} | ||
- name: Add key | ||
authorized_key: | ||
ansible.posix.authorized_key: | ||
user: '{{ os_ansible_user_userid }}' | ||
state: present | ||
manage_dir: yes | ||
manage_dir: true | ||
key: "{{ lookup('file', item) }}" | ||
with_fileglob: | ||
- /home/{{ os_ansible_user_userid }}/.ssh/{{ os_ansible_user_keyfile }} |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# SAP OS Tools - /etc/hosts | ||
|
||
- name: SAP OS Tools - /etc/hosts | ||
include_tasks: update_etchosts.yml | ||
ansible.builtin.include_tasks: update_etchosts.yml | ||
loop: "{{ os_etchosts_entries }}" | ||
loop_control: | ||
loop_var: passed_entry |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
- name: SAP OS Tools - /etc/hosts - Split passed entry | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
passed_ip: "{{ passed_entry.split()[0] }}" | ||
passed_host: "{{ passed_entry.split()[1] }}" | ||
|
||
- name: SAP OS Tools - /etc/hosts - Deduplicate values from /etc/hosts | ||
lineinfile: | ||
ansible.builtin.lineinfile: | ||
path: /etc/hosts | ||
create: false | ||
regexp: (?i)^\s*{{ passed_ip }}\s+ | ||
state: absent | ||
|
||
- name: SAP OS Tools - /etc/hosts - Update | ||
lineinfile: | ||
ansible.builtin.lineinfile: | ||
path: /etc/hosts | ||
line: "{{ passed_ip }}{{ os_etchosts_delimiter }}{{ passed_host }}.{{ os_etchosts_fqdn }}{{ os_etchosts_delimiter }}{{ passed_host }}" |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
ssh_known_hosts_command: "ssh-keyscan -T 10" | ||
ssh_known_hosts_file: "{{ lookup('env','HOME') + '/.ssh/known_hosts' }}" | ||
ssh_known_hosts: "{{ groups['all'] }}" | ||
ssh_known_hosts: "{{ groups['all'] }}" |
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
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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
- name: SAP {{ sap_control_name_header }} - Cleanipc {{ passed_sap_nr }} | ||
shell: | | ||
ansible.builtin.shell: | | ||
source ~/.profile && cleanipc {{ passed_sap_nr }} remove | ||
args: | ||
executable: /bin/bash | ||
become: yes | ||
become: true | ||
become_method: sudo | ||
become_user: "{{ passed_sap_sid | lower }}adm" | ||
register: cleanipc | ||
changed_when: | ||
- "'Number of IPC-Objects...........: 0' not in cleanipc.stdout" | ||
- "'Number of IPC-Objects...........: 0' not in cleanipc.stdout" |
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 |
---|---|---|
@@ -1,38 +1,37 @@ | ||
# Restart sapstartsrv | ||
|
||
|
||
# Get number of sapstartsrv processes running for {{ passed_sap_sid }}-{{ passed_sap_nr }} | ||
- name: SAPstartsrv - Get number of sapstartsrv processes running for {{ passed_sap_sid }}-{{ passed_sap_nr }} | ||
shell: | | ||
ansible.builtin.shell: | | ||
ps -ef | grep {{ passed_sap_sid }} | grep {{ passed_sap_nr }} | grep sapstartsrv | awk '{ print $8 }' | ||
register: num_of_sapstartsrv_reg | ||
|
||
- name: SAPstartsrv - Set fact for number of sapstartsrv | ||
set_fact: | ||
ansible.builtin.set_fact: | ||
num_of_sapstartsrv: "{{ num_of_sapstartsrv_reg.stdout.split() }}" | ||
|
||
# Stop sapstartsrv | ||
- name: SAPstartsrv - Stop sapstartsrv {{ passed_sap_sid }}-{{ passed_sap_nr }} | ||
shell: | | ||
ansible.builtin.shell: | | ||
source ~/.profile && cdexe; sapcontrol -nr {{ passed_sap_nr }} -function StopService {{ passed_sap_sid }} | ||
args: | ||
executable: /bin/bash | ||
become: yes | ||
become: true | ||
become_user: "{{ passed_sap_sid | lower }}adm" | ||
register: sap_stop_sapstartsrv | ||
loop: "{{ num_of_sapstartsrv }}" | ||
delay: 2 | ||
|
||
# Start sapstartsrv | ||
- name: SAPstartsrv - Start sapstartsrv {{ passed_sap_sid }}-{{ passed_sap_nr }} | ||
shell: | | ||
ansible.builtin.shell: | | ||
source ~/.profile && cdexe; sapcontrol -nr {{ passed_sap_nr }} -function StartService {{ passed_sap_sid }} | ||
args: | ||
executable: /bin/bash | ||
become: yes | ||
become: true | ||
become_user: "{{ passed_sap_sid | lower }}adm" | ||
register: sap_start_sapstartsrv | ||
|
||
- name: SAPstartsrv - Wait for 10 seconds for sapstartsrv to initialize | ||
pause: | ||
ansible.builtin.pause: | ||
seconds: 10 |
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
Oops, something went wrong.