brusq-RH 2 months ago
parent
commit
f20deb234c
  1. 38
      aap/playbooks/install_application_pacman.yaml
  2. 12
      aap/playbooks/register_vm.yaml

38
aap/playbooks/install_application_pacman.yaml

@ -0,0 +1,38 @@
---
- name: Deploy application on test env
hosts: "{{ vm_name }}"
gather_facts: false
tasks:
- name: Install Nodejs
yum:
name: npm
state: present
- name: Install Nodejs
yum:
name: git
state: present
- name: Git Clone / Update Pacman application
ansible.builtin.git:
repo: https://github.com/brusq-RH/pacman
dest: /src/pacman
update: no
- name: Install Pacman application dependicies
npm:
path: /src/pacman
state: present
- name: Copy Pacman systemd file
copy:
src: files/pacman.service
dest: /usr/lib/systemd/system/
- name: Restart application
systemd:
name: pacman
state: restarted
daemon_reload: yes

12
aap/playbooks/register_vm.yaml

@ -0,0 +1,12 @@
---
- name: Register VM
hosts: "{{ vm_name }}"
gather_facts: false
tasks:
- name: Register VM on red hat portal
community.general.redhat_subscription:
state: present
username: "{{ username }}"
password: "{{ password }}"
Loading…
Cancel
Save