diff --git a/ansible/configure_app.yml b/ansible/configure_app.yml index 288bfc3e4ee2550623af550060303af7dc3a91d5..e8c5b20e40bd3b4c4436bac9c7433cd2f4234096 100644 --- a/ansible/configure_app.yml +++ b/ansible/configure_app.yml @@ -1,9 +1,14 @@ - name: Git checkout bootiful project - become: false + become: true + become_user: bootiful ansible.builtin.git: repo: "{{ git_repo }}" - dest: "{{ git_clone_dest }}" + dest: "/home/bootiful/{{ git_clone_dest }}" version: "{{ git_branch }}" register: git_checkout_result - + +#- name: Build bootiful +# become: false +# community.general.make: +# chdir: "{{ git_clone_dest }}" diff --git a/ansible/configure_runtime.yml b/ansible/configure_runtime.yml index 8ee27110519ec9af84bb2e8c3eaa3be0ca98d1d4..2f99bacd05309150bb9121cc9e7db9f5188a00be 100644 --- a/ansible/configure_runtime.yml +++ b/ansible/configure_runtime.yml @@ -11,8 +11,47 @@ ansible.builtin.apt: pkg: - python3-pip + - python-is-python3 + - pkg-config + - bison + - flex - git - build-essential - - docker.io - - docker-compose + - automake + - autoconf + - autogen + - libtool + - shtool + - htop + - nfs-common + - nfs-kernel-server + - rpcbind + - acl + - autopoint state: latest + +#- docker.io +#- docker-compose + +- name: Start service nfs, if not started + become: true + ansible.builtin.service: + name: nfs-utils.service + state: started + enabled: true + +- name: Create a user 'bootiful' with a home directory + become: true + ansible.builtin.user: + name: bootiful + create_home: yes + shell: /bin/bash + groups: docker + append: yes + +- name: Copying shh key to remote host + become: true + authorized_key: + user: bootiful + state: present + key: "{{ lookup('file', lookup('env','HOME') + '/.ssh/id_rsa.pub')}}" diff --git a/ansible/hosts b/ansible/hosts index 37dbf693f6f8e8901c4c4d9da654fb1e18bfb8d7..bea50940dcd0a63549e37f2acbc0427e08110772 100644 --- a/ansible/hosts +++ b/ansible/hosts @@ -1,2 +1,2 @@ [bootiful_server] -bootiful_server_1 ansible_port=22 ansible_user=pierre ansible_host=bootiful-server +bootiful_server_1 ansible_port=22 ansible_host=bootiful-server diff --git a/ansible/vars.yml b/ansible/vars.yml index b492a2961295117f17a7480076da842170570caf..60f0f4fe9c6cecc32006a9f3ce3b2d4d13e15ea2 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -1,3 +1,3 @@ git_repo: "https://gitedu.hesge.ch/pierre.kunzli/bootiful.git" -git_branch: master +git_branch: ansible git_clone_dest: bootiful