Skip to content

Commit

Permalink
test secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiKhomik committed Dec 18, 2024
1 parent a428dec commit 39d1661
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 28 deletions.
18 changes: 11 additions & 7 deletions ansible1/roles/packages/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,29 +50,33 @@
mode: 644

- name: Ensure RVM is sourced
shell: source ~/.rvm/scripts/rvm
shell: |
source ~/.rvm/scripts/rvm && rvm use 3.3.5 do ruby --version
args:
executable: /bin/bash
become_user: "{{ username_on_the_host.stdout }}"

- name: Install Bundler gem
shell: |
~/.rvm/bin/rvm use {{ ruby_version }} do gem install bundler -v {{ bundler_version }}
args:
creates: "~/.rvm/gems/ruby-{{ ruby_version }}/bin/bundler"
gem install bundler -v {{ bundler_version }}
# ~/.rvm/bin/rvm use {{ ruby_version }} do gem install bundler -v {{ bundler_version }}
# args:
# creates: "~/.rvm/gems/ruby-{{ ruby_version }}/bin/bundler"
become_user: "{{ username_on_the_host.stdout }}"

- name: Run bundle install with Gemfile
shell: |
~/.rvm/bin/rvm use {{ ruby_version }} do bundle install --gemfile Gemfile
bundle install --gemfile Gemfile
# ~/.rvm/bin/rvm use {{ ruby_version }} do bundle install --gemfile Gemfile
args:
chdir: "/home/{{ username_on_the_host.stdout }}/ZeroWaste/"
become_user: "{{ username_on_the_host.stdout }}"

- name: Run rake db:migrate
shell: |
~/.rvm/bin/rvm use {{ ruby_version }} do rake db:migrate
become: yes
rake db:migrate
# ~/.rvm/bin/rvm use {{ ruby_version }} do rake db:migrate
# become: yes
become_user: "{{ username_on_the_host.stdout }}"
args:
chdir: "/home/{{ username_on_the_host.stdout }}/ZeroWaste/"
22 changes: 1 addition & 21 deletions ansible1/roles/packages/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
---
ruby_version: "3.3.5"
rails_version: "7.1.2"
bundler_version: "2.2.8"
# puma_version: "5.6.9"
# ruby_install_rails: true
# ruby_install_from_source: true
# ruby_install_bundler: true
# ruby_install_puma: true
# ruby_install_gems_development: true
# ruby_install_gems_user: root
bundler_version: "2.5.11"
ruby_packages:
- ruby-full
- ruby-dev
Expand All @@ -27,20 +20,7 @@ ruby_packages:
- libffi-dev
- libgdbm-dev
- libpq-dev
# rvm_dependencies:
# - curl
# - gnupg
# - libreadline-dev
# - libsqlite3-dev
# - sqlite3
# - libxml2-dev
# - libxslt1-dev
# - libcurl4-openssl-dev
# - software-properties-common
ruby_rubygems_package_name: rubygems
# ruby_download_url: "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-{{ ruby_version }}.tar.xz"
# workspace: /root
# ruby_source_configure_command: ./configure --enable-shared
rvm1_install_path: "~/.rvm"
rvm1_rvm: "{{ rvm1_install_path }}/bin/rvm"
rvm1_temp_download_path: "/tmp"
Expand Down
7 changes: 7 additions & 0 deletions ansible1/roles/packages/vars/secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$ANSIBLE_VAULT;1.1;AES256
65653265663766386438356366353336633237313434356637376463353761363761353035623662
3064363461346131373966646531313662353063633836660a353739623432653264663761353532
37333830376362643266346163373935616335393830636334306163346266333832383537393963
3830646132303332660a643065333933353930663831336161343839663933636533306163396461
32646563396637393763313338343432343335663762656139633233623365386133323635376330
6439393930636366363562373462303737396232633666376265
43 changes: 43 additions & 0 deletions ansible1/roles/postgresql/pass_file/ansible-vault.pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
G1RcOpoPn0CC8EPo/sfpbMkqeVuiQKIZWqNhqCReDBhkbQw0ZMjLL1GD+3H3DJGn
5KcIygRIr4nlE1Q0nb2yPSWVd4X+McCwl/k/dwIjerY4UbcbOO0qVoC0OOj83v2I
uwuwMEpPXQOAkpaWOv6OYKxziRzala2eHOXNsjCF+ypIDrhuPjhUcK954VyXNMdT
X53w4qC0H9DnVFxLxAbMf8MDUxIAK5eOO+GSZMtHjlvQ0kRrcRsPLlSaF+mWHM9O
F8yK9zE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