File tree Expand file tree Collapse file tree 5 files changed +27
-16
lines changed
awx-project-export/inventories
awx-project-import-export Expand file tree Collapse file tree 5 files changed +27
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
tower :
2
- host : localhost
2
+ host : http://xxx.xxx.xxx.xxx
3
3
username : admin
4
4
password : password
5
5
6
6
# ansible-tower-cli をインストールした環境
7
- ansible_python_interpreter : /usr/bin /python
7
+ ansible_python_interpreter : /Users/kento/.pyenv/shims /python
Original file line number Diff line number Diff line change
1
+ [tower]
2
+ # AWXのグローバルIP
3
+ xxx.xxx.xxx.xxx
Original file line number Diff line number Diff line change 3
3
connection : local
4
4
5
5
tasks :
6
- - name : export job
6
+ - name : export all project
7
7
# ↓ https://docs.ansible.com/ansible/latest/modules/tower_receive_module.html
8
8
tower_receive :
9
- tower_host : " {{ tower.host }}"
10
- tower_username : " {{ tower.username }}" # 別途定義した認証情報
11
- tower_password : " {{ tower.password }}" # 別途定義した認証情報
12
9
validate_certs : no
13
- job_template :
14
- - testjob1
10
+ tower_host : " {{ tower.host }}"
11
+ tower_username : " {{ tower.username }}"
12
+ tower_password : " {{ tower.password }}"
13
+ project :
14
+ - all
15
15
register : result
16
16
17
- - name : save job
17
+ - name : save project
18
18
copy :
19
19
content : " {{ result.assets | to_nice_yaml }}"
20
- dest : job_data .yml
20
+ dest : project_data .yml
Original file line number Diff line number Diff line change
1
+ - hosts : tower
2
+ gather_facts : no
3
+ connection : local
4
+
5
+ tasks :
6
+ - name : import all project
7
+ # ↓ https://docs.ansible.com/ansible/latest/modules/tower_receive_module.html
8
+ tower_send :
9
+ validate_certs : no
10
+ tower_host : " {{ tower.host }}"
11
+ tower_username : " {{ tower.username }}"
12
+ tower_password : " {{ tower.password }}"
13
+ files :
14
+ - project_data.yml
You can’t perform that action at this time.
0 commit comments