diff --git a/aap/playbooks/install_application_pacman.yaml b/aap/playbooks/install_application_pacman.yaml new file mode 100644 index 0000000..61e5267 --- /dev/null +++ b/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 \ No newline at end of file diff --git a/aap/playbooks/register_vm.yaml b/aap/playbooks/register_vm.yaml new file mode 100644 index 0000000..26ae4d0 --- /dev/null +++ b/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 }}" \ No newline at end of file