以前からデプロイ作業の一部としてpython3.6とpipのインストールを
ansibleのプレイブックで以下のようにタスク定義して実行していたのですが、
その後pip3のシンボリックリンクを作るところでエラーが突如出るようになってしまいました。
"src file does not exist, use "force=yes" if you really want to create the link: /usr/local/bin/pip3"
原因がわかる方いらっしゃいましたらご教示願えますでしょうか?
yml
1# tasks file for python3 2- name: install python3.6 3 package: 4 name: python36 5 state: present 6 7- name: install pip3.6 8 command: python3.6 -m ensurepip 9 become: True 10 become_method: sudo 11 12- name: install python3 development library (need Python.h) 13 package: 14 name: "python36-devel" 15 state: present 16 17- name: symbolic link python3 18 file: src=/usr/bin/python3.6 dest=/usr/bin/python3 owner=root group=root state=link 19 20- name: symbolic link pip3 21 file: src=/usr/local/bin/pip3 dest=/usr/bin/pip3 owner=root group=root state=link
Log
1 2PLAY [node] ********************************************************************************************************************************************* 3 4TASK [Gathering Facts] ********************************************************************************************************************************** 5ok: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 6 7TASK [infrastructure/instance/ntp : set the timezone] *************************************************************************************************** 8changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 9 10TASK [infrastructure/instance/ntp : install ntp] ******************************************************************************************************** 11changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 12 13TASK [infrastructure/instance/ntp : start and enable ntp server] **************************************************************************************** 14changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 15 16TASK [infrastructure/instance/httpd : install httpd] **************************************************************************************************** 17changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 18 19TASK [infrastructure/instance/httpd : start and enable httpd] ******************************************************************************************* 20changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 21 22TASK [epel : enable epel] ******************************************************************************************************************************* 23changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 24 25TASK [python3 : install python3.6] ********************************************************************************************************************** 26changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 27 28TASK [python3 : install pip3.6] ************************************************************************************************************************* 29changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 30 31TASK [python3 : install python3 development library (need Python.h)] ************************************************************************************ 32changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 33 34TASK [python3 : symbolic link python3] ****************************************************************************************************************** 35changed: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com] 36 37TASK [python3 : symbolic link pip3] ********************************************************************************************************************* 38fatal: [ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "msg": "src file does not exist, use \"force=yes\" if you really want to create the link: /usr/local/bin/pip3", "owner": "root", "path": "/usr/bin/pip3", "secontext": "system_u:object_r:bin_t:s0", "size": 407, "src": "/usr/local/bin/pip3", "state": "file", "uid": 0} 39 to retry, use: --limit @/home/ec2-user/environment/hon_pro_191107/SimilarChartSearch/SimilarChartSearch/Env/infra/scs_ansible.retry 40 41PLAY RECAP ********************************************************************************************************************************************** 42ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com : ok=11 changed=10 unreachable=0 failed=1
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/11/07 23:34
退会済みユーザー
2019/11/08 01:17
2019/11/08 06:20